Exemplo n.º 1
0
        public void LaunderAddress_SplittetStreetName_Good()
        {
            //Arrange
            Address address = new Address {
                StreetName = "Ny Adelgade", StreetNumber = "10", ZipCode = 1104
            };
            AddressLaundering uut = new AddressLaundering();
            //Act
            Address result = uut.LaunderAddress(address);

            //Assert
            Assert.AreEqual(address, result);
        }
Exemplo n.º 2
0
        public void LaunderAddress_ThrowException_E900_BadZipCode()
        {
            //Arrange
            Address address = new Address {
                StreetName = "Ny Adelgade", StreetNumber = "10", ZipCode = 99999
            };
            AddressLaundering uut = new AddressLaundering();

            //Act

            //Assert
            Assert.Throws(typeof(AddressLaunderingException),
                          () => uut.LaunderAddress(address), "Postnummer eksisterer ikke");
        }
Exemplo n.º 3
0
        public void LaunderAddress_ThrowException_E800_BadStreet()
        {
            //Arrange
            Address address = new Address {
                StreetName = "Ny VejNavn Test Hans", StreetNumber = "10", ZipCode = 1104
            };
            AddressLaundering uut = new AddressLaundering();

            //Act

            //Assert
            Assert.Throws(typeof(AddressLaunderingException),
                          () => uut.LaunderAddress(address), "Vejnavn findes ikke indenfor postdistriktet");
        }
Exemplo n.º 4
0
        public void LaunderAddress_ThrowException_E700_BadStreetNr()
        {
            //Arrange
            Address address = new Address {
                StreetName = "Ny Adelgade", StreetNumber = "999999", ZipCode = 1104
            };
            AddressLaundering uut = new AddressLaundering();

            //Act

            //Assert
            Assert.Throws(typeof(AddressLaunderingException),
                          () => uut.LaunderAddress(address), "Husnummer eksisterer ikke på vejen");
        }