Skip to content

Commit

Permalink
fix : CI (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang authored Dec 8, 2023
1 parent e75f35e commit c027369
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ public void QueryDictionary()
[Theory]
[InlineData(1, NumericalEnum11.One)]
[InlineData(2, NumericalEnum11.Two)]
public void GetNumericalEnums(int id, NumericalEnum11 numericalEnum)
public void GetNumericalEnums(int value, NumericalEnum11 numericalEnum)
{
var list = _mapper.Query<NumericalEnum11?>(new RequestContext
{
RealSql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE Id = ?id",
Request = new { id }
RealSql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE NumericalEnum = ?value",
Request = new { value }
});

Assert.NotNull(list);
Assert.True(list.All(t => t == numericalEnum));

var result = _repository.GetNumericalEnums(id);
var result = _repository.GetNumericalEnums(value);

Assert.NotNull(result);
Assert.True(result.All(t => t == numericalEnum));
Expand Down
4 changes: 2 additions & 2 deletions src/SmartSql.Test/Repositories/IAllPrimitiveRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public interface IAllPrimitiveRepository
[Statement(Id = "QueryDictionary", Sql = "SELECT T.* From T_AllPrimitive T limit ?Taken")]
IList<IDictionary<string, object>> QueryDictionary([Param("Taken")] int taken);

[Statement(Sql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE Id = ?id")]
List<NumericalEnum11> GetNumericalEnums(int id);
[Statement(Sql = "SELECT NumericalEnum FROM T_AllPrimitive WHERE NumericalEnum = ?numericalEnum")]
List<NumericalEnum11> GetNumericalEnums(int numericalEnum);

[Statement(Sql = "truncate table T_AllPrimitive")]
void Truncate();
Expand Down

0 comments on commit c027369

Please sign in to comment.