public static ProducerAddress WithSecondaryName(string secondaryName) { var builder = new ProducerAddressBuilder(); builder.SecondaryName = secondaryName; return builder.Build(); }
public void ProducerAddress_EqualsProducerAddressDifferentPostCode_ReturnsFalse() { var producerAddress = ProducerAddressBuilder.NewProducerAddress; var producerAddress2 = ProducerAddressBuilder.WithPostCode("post code test"); Assert.NotEqual(producerAddress, producerAddress2); }
public void ProducerAddress_EqualsProducerAddressDifferentLocality_ReturnsFalse() { var producerAddress = ProducerAddressBuilder.NewProducerAddress; var producerAddress2 = ProducerAddressBuilder.WithLocality("locality test"); Assert.NotEqual(producerAddress, producerAddress2); }
public static ProducerAddress WithStreet(string street) { var builder = new ProducerAddressBuilder(); builder.street = street; return builder.Build(); }
public void ProducerAddress_EqualsProducerAddressDifferentAdministrativeArea_ReturnsFalse() { var producerAddress = ProducerAddressBuilder.NewProducerAddress; var producerAddress2 = ProducerAddressBuilder.WithAdministrativeArea("administrative area test"); Assert.NotEqual(producerAddress, producerAddress2); }
public void ProducerAddress_EqualsProducerAddressDifferentStreet_ReturnsFalse() { var producerAddress = ProducerAddressBuilder.NewProducerAddress; var producerAddress2 = ProducerAddressBuilder.WithStreet("street test"); Assert.NotEqual(producerAddress, producerAddress2); }
public static ProducerAddress WithCountry(Country country) { var builder = new ProducerAddressBuilder(); builder.Country = country; return builder.Build(); }
public void ProducerAddress_EqualsProducerAddressDifferentSecondaryName_ReturnsFalse() { var producerAddress = ProducerAddressBuilder.NewProducerAddress; var producerAddress2 = ProducerAddressBuilder.WithSecondaryName("secondary name test"); Assert.NotEqual(producerAddress, producerAddress2); }
public static ProducerAddress WithAdministrativeArea(string administrativeArea) { var builder = new ProducerAddressBuilder(); builder.administrativeArea = administrativeArea; return builder.Build(); }
public static ProducerAddress WithPostCode(string postCode) { var builder = new ProducerAddressBuilder(); builder.postCode = postCode; return builder.Build(); }
public static ProducerAddress WithTown(string town) { var builder = new ProducerAddressBuilder(); builder.town = town; return builder.Build(); }
public static ProducerAddress WithLocality(string locality) { var builder = new ProducerAddressBuilder(); builder.locality = locality; return builder.Build(); }
public void ProducerAddress_EqualsProducerAddressDifferentTown_ReturnsFalse() { var producerAddress = ProducerAddressBuilder.NewProducerAddress; var producerAddress2 = ProducerAddressBuilder.WithTown("town test"); Assert.NotEqual(producerAddress, producerAddress2); }
public void ProducerAddress_EqualsProducerAddressDifferentCountry_ReturnsFalse() { var producerAddress = ProducerAddressBuilder.WithCountry(new AlwaysUnequalCountry()); var producerAddress2 = ProducerAddressBuilder.WithCountry(new AlwaysUnequalCountry()); Assert.NotEqual(producerAddress, producerAddress2); }
public static ProducerAddress WithPrimaryName(string primaryName) { var builder = new ProducerAddressBuilder(); builder.primaryName = primaryName; return builder.Build(); }
public void ProducerAddress_ToString_ReturnsConcatenatedString() { var producerAddress = ProducerAddressBuilder.WithCountry(new Country(Guid.NewGuid(), "TestCountry")); var address = producerAddress.ToString(); Assert.Equal("PrimaryName, SecondaryName, Street, Town, Locality, AdministrativeArea, PostCode, TestCountry", address); }
public void ProducerAddress_ToString_ReturnsConcatenatedStringExcludingEmptyValues(string secondaryAddress) { var buider = new ProducerAddressBuilder(); buider.SecondaryName = secondaryAddress; buider.Country = new Country(Guid.NewGuid(), "TestCountry"); var producerAddress = buider.Build(); var address = producerAddress.ToString(); Assert.Equal("PrimaryName, Street, Town, Locality, AdministrativeArea, PostCode, TestCountry", address); }