Beispiel #1
0
        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));
        }
Beispiel #2
0
        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);
        }