public async Task GetGroupsByCountry_ShouldReturnStatusOkAndIEnumerableOfGroupDto()
        {
            //Arrange
            var groupServiceMock = Substitute.For <IGroupService>();
            var group            = new Group {
                Id = 1, Name = "someName", Country = "someCountry", CreationYear = 2000
            };
            var expected = new List <GroupDto> {
                GroupDto.GetGroupDtoWithId(1, "someName", "someCountry", 2000)
            };

            groupServiceMock.GetAllAsync().Returns(new List <GroupDto>
            {
                GroupDto.GetGroupDtoWithId(1, "someName", "someCountry", 2000)
            });
            var sut = new GroupsController(groupServiceMock);

            //Act
            var response = await sut.GetGroupsByCountry("someCountry");

            //Assert
            await groupServiceMock.Received().FindOneAsync(g => g.Country == "someCountry");

            //Assert.Equal(200, ((StatusCodeResult) response.Result).StatusCode);
            //Assert.Equal(expected, response.Value);
        }
        public async Task GetGroupsByCountry_NotSpecifiedNameStatusBadRequest(string name)
        {
            //Arrange
            var groupServiceMock = Substitute.For <IGroupService>();
            var sut = new GroupsController(groupServiceMock);

            //Act
            var response = await sut.GetGroupsByCountry(name);

            //Assert
            Assert.Equal(400, ((StatusCodeResult)response.Result).StatusCode);
        }
        public async Task GetGroupsByCountry_NotExistingNameNameStatusBadRequest()
        {
            //Arrange
            var groupServiceMock = Substitute.For <IGroupService>();
            var group            = GroupDto.GetGroupDtoWithId(1, "someName", "someCountry", 2000);

            groupServiceMock.GetAllAsync().Returns(new List <GroupDto> {
                group
            });
            //groupServiceMock.FindOneAsync(g => g.Country == "notExistingName").Returns(null);
            var sut = new GroupsController(groupServiceMock);

            //Act
            var response = await sut.GetGroupsByCountry("notExistingName");

            //Assert
            await groupServiceMock.Received().FindOneAsync(g => g.Name == "notExistingName");

            //Assert.Equal(400, ((StatusCodeResult) response.Result).StatusCode);
        }