Skip to content

Commit

Permalink
async void -> async Task
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Jan 5, 2025
1 parent c8f9a04 commit c20cf25
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/Repositories.Base/BaseRepositoriesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ public void FindById_MultiKeys()
}

[Fact]
public async void FindByIdAsync()
public async Task FindByIdAsync()
{
var user = await Db.Users.FindByIdAsync(2);
Assert.Null(user.Deleted);
Assert.Equal("TestName1", user.Name);
}

[Fact]
public async void FindByIdAsync_WithJoins_NotNull()
public async Task FindByIdAsync_WithJoins_NotNull()
{
var user = await Db.Users.FindByIdAsync<Car, Phone, Address>(1, x => x.Cars, x => x.Phone, x => x.Addresses);
Assert.Null(user.Deleted);
Expand All @@ -117,7 +117,7 @@ public async void FindByIdAsync_WithJoins_NotNull()
}

[Fact]
public async void FindByIdAsync_WithJoins_CheckCount()
public async Task FindByIdAsync_WithJoins_CheckCount()
{
var address = await Db.Address.FindByIdAsync<User>(1, x => x.Users);
Assert.Equal("Street0", address.Street);
Expand All @@ -126,7 +126,7 @@ public async void FindByIdAsync_WithJoins_CheckCount()
}

[Fact]
public async void FindAllAsync_WithPredicate_CheckCount()
public async Task FindAllAsync_WithPredicate_CheckCount()
{
var addresses = (await Db.Address.FindAllAsync<User>(q => q.Id == 1, x => x.Users)).ToArray();
Assert.Single(addresses);
Expand All @@ -137,7 +137,7 @@ public async void FindAllAsync_WithPredicate_CheckCount()
}

[Fact]
public async void FindAllAsync_NullPredicate_CheckCount()
public async Task FindAllAsync_NullPredicate_CheckCount()
{
var addresses = (await Db.Address.FindAllAsync<User>(null, x => x.Users)).ToArray();
var address = addresses.First();
Expand All @@ -157,7 +157,7 @@ protected void FindJoin_CollectionnRecord()
}

[Fact]
public async void FindJoinAsync_CollectionnRecord()
public async Task FindJoinAsync_CollectionnRecord()
{
var user = await Db.Users.FindAsync<Car>(q => q.Id == 1, q => q.Cars);
Assert.Null(user.Deleted);
Expand Down Expand Up @@ -281,7 +281,7 @@ public void FindAllJoinSameTableTwice()
}

[Fact]
public async void FindAllJoinSameTableTwiceAsync()
public async Task FindAllJoinSameTableTwiceAsync()
{
var user = (await Db.Users.FindAllAsync<Phone, Car, Phone>(x => x.Id == 1, q => q.OfficePhone, q => q.Cars, q => q.Phone)).First();
Assert.True(user.Cars.Count == 2);
Expand Down

0 comments on commit c20cf25

Please sign in to comment.