Пример #1
0
        public void PaddedPostCode([Values("TN4",
                                           "DN 3",
                                           "M1",
                                           "W1P",
                                           "EC1A")]
                                   string outcode,
                                   [Values("9BP",
                                           "3AZ",
                                           "3DE",
                                           "2JT",
                                           "3HW")]
                                   string incode,
                                   [Values("TN4  9BP",
                                           "DN3  3AZ",
                                           "M1   3DE",
                                           "W1P  2JT",
                                           "EC1A 3HW")]
                                   string expect)
        {
            // Arrange
            var expected = expect;

            // Act

            var pCode = new PostCode(outcode + " " + incode);

            Assert.That(pCode,
                        Is.Not.Null);

            var actual = pCode.PaddedPostCode();

            // Assert

            Assert.That(actual,
                        Is.Not.Null);
            Assert.That(actual,
                        Is.EqualTo(expected));
        }