Skip to content

Commit

Permalink
🔵test: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaferlez committed Mar 28, 2024
1 parent 7b7512c commit ad24734
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Simpleverse.Repository.Db.Test/SqlServer/Entity/EntityTest.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Dapper.Contrib.Extensions;
using System.Linq;
using Simpleverse.Repository.Db.Extensions;
using Simpleverse.Repository.Db.Extensions.Dapper;
using Xunit;
using Xunit.Abstractions;
using System;
using System.Transactions;
using Simpleverse.Repository.Db.SqlServer;
using StackExchange.Profiling.Data;
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Transactions;
using Xunit;
using Xunit.Abstractions;

namespace Simpleverse.Repository.Db.Test.SqlServer.Entity
{
Expand Down Expand Up @@ -76,7 +76,7 @@ public void AddAsyncWithAmbientTest()
// assert
using (var connection = _fixture.GetConnection())
{

var records = connection.GetAll<Identity>();
Assert.Equal(10, recordCount);
Assert.Equal(10, records.Count());
Expand Down Expand Up @@ -120,7 +120,7 @@ public void ListAsyncTupleFailTest()
var entity = new IdentityEntity(_fixture);

// act
var exception = Assert.Throws<NotSupportedException>(
var exception = Assert.ThrowsAsync<NotSupportedException>(
() => entity.ListAsync<(
Identity identity1,
Identity identity2,
Expand All @@ -130,8 +130,8 @@ public void ListAsyncTupleFailTest()
Identity identity6,
Identity identity7,
Identity identity8
)>().Result
);
)>()
).Result;

Assert.Equal("Number of Tuple arguments is more than the supported 7.", exception.Message);
}
Expand Down Expand Up @@ -274,9 +274,9 @@ public IdentityEntity(DatabaseFixture fixture)
{
}

public IdentityEntity(SqlRepository sqlRepository) : base(sqlRepository, new Table<Identity>("I")) { }
public IdentityEntity(SqlRepository sqlRepository) : base(sqlRepository, new Table<Identity>("I")) { }

protected override void SelectQuery(QueryBuilder<Identity> builder, IdentityQueryFilter filter, DbQueryOptions options)
protected override void SelectQuery(QueryBuilder<Identity> builder, IdentityQueryFilter filter, DbQueryOptions options)
{
var explicitKey = new Table<ExplicitKey>("EK");

Expand All @@ -293,7 +293,7 @@ protected override void SelectQuery(QueryBuilder<Identity> builder, IdentityQuer

protected override void Filter(QueryBuilder<Identity> builder, IdentityQueryFilter filter)
{
builder.Where(x=> x.Name, filter.Name);
builder.Where(x => x.Name, filter.Name);
base.Filter(builder, filter);
}
}
Expand Down

0 comments on commit ad24734

Please sign in to comment.