public async void LunchRepository_TeamNameExistsAsync_ReturnsFalseWhenTeamDoesNotExist() { // arrange LunchContext context = GetContext(); LunchRepository target = new LunchRepository(context); const string Name = "bob's team"; // act bool result = await target.TeamNameExistsAsync(Name); // assert Assert.False(result); }
public async void LunchRepository_TeamNameExistsAsync_ReturnsTrueWhenTeamDoesExist() { // arrange LunchContext context = GetContext(); LunchRepository target = new LunchRepository(context); const string Name = "bob's team"; context.Teams.Add(new TeamEntity { Name = Name }); context.SaveChanges(); // act bool result = await target.TeamNameExistsAsync(Name); // assert Assert.True(result); }