public async Task GetGroupById() { //Arrenge int groupId = 2; //Act GroupDTO groupDTO = await groupService.Get(groupId); //Assert groupDTO.Should().BeEquivalentTo(groupDTOs.FirstOrDefault(x => x.Id == groupId)); }
public async Task AddGroupInDatabase() { //Arrenge GroupDTO groupDTO = new GroupDTO() { Id = groupDTOs.Count() + 1, Name = "SE-621", Capacity = 27 }; groupDTOs.Add(groupDTO); //Act await groupService.Create(groupDTO); GroupDTO groupFoundDTO = await groupService.Get(groupDTO.Id); //Assert groupDTO.Should().BeEquivalentTo(groupFoundDTO); }