Пример #1
0
            public static ProducerAddress WithSecondaryName(string secondaryName)
            {
                var builder = new ProducerAddressBuilder();
                builder.SecondaryName = secondaryName;

                return builder.Build();
            }
Пример #2
0
        public void ProducerAddress_EqualsProducerAddressDifferentPostCode_ReturnsFalse()
        {
            var producerAddress = ProducerAddressBuilder.NewProducerAddress;
            var producerAddress2 = ProducerAddressBuilder.WithPostCode("post code test");

            Assert.NotEqual(producerAddress, producerAddress2);
        }
Пример #3
0
        public void ProducerAddress_EqualsProducerAddressDifferentLocality_ReturnsFalse()
        {
            var producerAddress = ProducerAddressBuilder.NewProducerAddress;
            var producerAddress2 = ProducerAddressBuilder.WithLocality("locality test");

            Assert.NotEqual(producerAddress, producerAddress2);
        }
Пример #4
0
            public static ProducerAddress WithStreet(string street)
            {
                var builder = new ProducerAddressBuilder();
                builder.street = street;

                return builder.Build();
            }
Пример #5
0
        public void ProducerAddress_EqualsProducerAddressDifferentAdministrativeArea_ReturnsFalse()
        {
            var producerAddress = ProducerAddressBuilder.NewProducerAddress;
            var producerAddress2 = ProducerAddressBuilder.WithAdministrativeArea("administrative area test");

            Assert.NotEqual(producerAddress, producerAddress2);
        }
Пример #6
0
        public void ProducerAddress_EqualsProducerAddressDifferentStreet_ReturnsFalse()
        {
            var producerAddress = ProducerAddressBuilder.NewProducerAddress;
            var producerAddress2 = ProducerAddressBuilder.WithStreet("street test");

            Assert.NotEqual(producerAddress, producerAddress2);
        }
Пример #7
0
            public static ProducerAddress WithCountry(Country country)
            {
                var builder = new ProducerAddressBuilder();
                builder.Country = country;

                return builder.Build();
            }
Пример #8
0
        public void ProducerAddress_EqualsProducerAddressDifferentSecondaryName_ReturnsFalse()
        {
            var producerAddress = ProducerAddressBuilder.NewProducerAddress;
            var producerAddress2 = ProducerAddressBuilder.WithSecondaryName("secondary name test");

            Assert.NotEqual(producerAddress, producerAddress2);
        }
Пример #9
0
            public static ProducerAddress WithAdministrativeArea(string administrativeArea)
            {
                var builder = new ProducerAddressBuilder();
                builder.administrativeArea = administrativeArea;

                return builder.Build();
            }
Пример #10
0
            public static ProducerAddress WithPostCode(string postCode)
            {
                var builder = new ProducerAddressBuilder();
                builder.postCode = postCode;

                return builder.Build();
            }
Пример #11
0
            public static ProducerAddress WithTown(string town)
            {
                var builder = new ProducerAddressBuilder();
                builder.town = town;

                return builder.Build();
            }
Пример #12
0
            public static ProducerAddress WithLocality(string locality)
            {
                var builder = new ProducerAddressBuilder();
                builder.locality = locality;

                return builder.Build();
            }
Пример #13
0
        public void ProducerAddress_EqualsProducerAddressDifferentTown_ReturnsFalse()
        {
            var producerAddress = ProducerAddressBuilder.NewProducerAddress;
            var producerAddress2 = ProducerAddressBuilder.WithTown("town test");

            Assert.NotEqual(producerAddress, producerAddress2);
        }
Пример #14
0
        public void ProducerAddress_EqualsProducerAddressDifferentCountry_ReturnsFalse()
        {
            var producerAddress = ProducerAddressBuilder.WithCountry(new AlwaysUnequalCountry());
            var producerAddress2 = ProducerAddressBuilder.WithCountry(new AlwaysUnequalCountry());

            Assert.NotEqual(producerAddress, producerAddress2);
        }
Пример #15
0
            public static ProducerAddress WithPrimaryName(string primaryName)
            {
                var builder = new ProducerAddressBuilder();
                builder.primaryName = primaryName;

                return builder.Build();
            }
Пример #16
0
        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);
        }
Пример #17
0
        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);
        }
            public static ProducerAddress WithStreet(string street)
            {
                var builder = new ProducerAddressBuilder();
                builder.street = street;

                return builder.Build();
            }
            public static ProducerAddress WithLocality(string locality)
            {
                var builder = new ProducerAddressBuilder();
                builder.locality = locality;

                return builder.Build();
            }
            public static ProducerAddress WithCountry(Country country)
            {
                var builder = new ProducerAddressBuilder();
                builder.Country = country;

                return builder.Build();
            }
            public static ProducerAddress WithPostCode(string postCode)
            {
                var builder = new ProducerAddressBuilder();
                builder.postCode = postCode;

                return builder.Build();
            }
            public static ProducerAddress WithAdministrativeArea(string administrativeArea)
            {
                var builder = new ProducerAddressBuilder();
                builder.administrativeArea = administrativeArea;

                return builder.Build();
            }
            public static ProducerAddress WithPrimaryName(string primaryName)
            {
                var builder = new ProducerAddressBuilder();
                builder.primaryName = primaryName;

                return builder.Build();
            }
            public static ProducerAddress WithTown(string town)
            {
                var builder = new ProducerAddressBuilder();
                builder.town = town;

                return builder.Build();
            }
        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);
        }
            public static ProducerAddress WithSecondaryName(string secondaryName)
            {
                var builder = new ProducerAddressBuilder();
                builder.SecondaryName = secondaryName;

                return builder.Build();
            }