Beispiel #1
0
        public void SplitAtHyphens_1111Hyphen2222_All_2_Correct()
        {
            // Arrange
            var container = new AddressParseContainer("fake input");

            container.AddressParts.Add("1111-2222");
            var splitter = new AddressSplitter(container);

            // Act
            splitter.SplitAtHyphens();

            // Assert
            Assert.AreEqual(2, container.AddressParts.Count);
            Assert.AreEqual("1111", container.AddressParts[0]);
            Assert.AreEqual("2222", container.AddressParts[1]);
        }
Beispiel #2
0
        public void SplitAtHyphens_1111_2222Hyphen3333_All_3_Correct()
        {
            // Arrange
            var container = new AddressParseContainer("fake input");

            container.AddressParts.Add("1111");
            container.AddressParts.Add("2222-3333");
            var splitter = new AddressSplitter(container);

            // Act
            splitter.SplitAtHyphens();

            // Assert
            Assert.AreEqual(3, container.AddressParts.Count);
            Assert.AreEqual("1111", container.AddressParts[0]);
            Assert.AreEqual("2222", container.AddressParts[1]);
            Assert.AreEqual("3333", container.AddressParts[2]);
        }