コード例 #1
0
        public PetsModel Get()
        {
            var response = _ownerClient.GetOwnerDetails(url);
            var owners   = _jsonTransformer.ConvertFromJson(_httpResponseTransformer.TransformToJson(response, _logger));

            return(PetsService.CreatePetsModel(owners));
        }
コード例 #2
0
        public void Given_ListOfOwnersWithOnlyDogs_CreatePetsModel_Returns_ModelWithGenders()
        {
            var result = PetsService.CreatePetsModel(CreateDogOwners());

            result.Should().BeEquivalentTo(CreateEmptyPetsModelWithGenders());
        }
コード例 #3
0
        public void Given_EmptyListOfOwners_CreatePetsModel_Returns_EmptyModel()
        {
            var result = PetsService.CreatePetsModel(new List <Owner>());

            result.Should().BeEquivalentTo(CreateEmptyPetsModel());
        }
コード例 #4
0
        public void Given_ListOfOwners_CreatePetsModel_Returns_PetsModel()
        {
            var result = PetsService.CreatePetsModel(CreateOwners());

            result.Should().BeEquivalentTo(CreatePetsModel());
        }