public async void LunchRepository_GetTeamAsync_ReturnsNullIfTeamDoesNotExist() { // arrange LunchContext context = GetContext(); LunchRepository target = new LunchRepository(context); // act TeamDto result = await target.GetTeamAsync(8888); // assert Assert.Null(result); }
public async void LunchRepository_GetTeamAsync_ReturnsSpecifiedTeam() { // arrange LunchContext context = GetContext(); LunchRepository target = new LunchRepository(context); TeamEntity team = context.Teams.Add(new TeamEntity() { Name = "Tahra Dactyls", Zip = "90210", }).Entity; await context.SaveChangesAsync(); // act TeamDto result = await target.GetTeamAsync(team.Id); // assert Assert.Equal(team.Name, result.Name); Assert.Equal(team.Zip, result.Zip); }