Ejemplo n.º 1
0
 public static AddressTestBuilder AnAddress()
 {
     return(new AddressTestBuilder(AddressBuilder.Address()
                                   .WithCountry("Belgium")
                                   .WithHouseNumber("16A")
                                   .WithPostalCode("3000")
                                   .WithStreetName("Jantjesstraat")));
 }
Ejemplo n.º 2
0
 public override Address ToDomain(AddressDto addressDto)
 {
     return(AddressBuilder.Address()
            .WithStreetName(addressDto.StreetName)
            .WithHouseNumber(addressDto.HouseNumber)
            .WithPostalCode(addressDto.PostalCode)
            .WithCountry(addressDto.Country)
            .Build());
 }
        public void ToDto()
        {
            string streetName  = "Teststraat";
            string houseNumber = "88B";
            string postalCode  = "3000";
            string country     = "Belgium";

            AddressDto addressDto = new AddressMapper().ToDto(AddressBuilder.Address()
                                                              .WithStreetName(streetName)
                                                              .WithHouseNumber(houseNumber)
                                                              .WithPostalCode(postalCode)
                                                              .WithCountry(country)
                                                              .Build());


            Assert.Equal(streetName, addressDto.StreetName);
            Assert.Equal(houseNumber, addressDto.HouseNumber);
            Assert.Equal(postalCode, addressDto.PostalCode);
            Assert.Equal(country, addressDto.Country);
        }
Ejemplo n.º 4
0
 public static AddressTestBuilder AnEmptyAddress()
 {
     return(new AddressTestBuilder(AddressBuilder.Address()));
 }