예제 #1
0
        public void DisplaceFormaterTest()
        {
            DisplaceFormater formatter1 = new DisplaceFormater {
                Displacement = "d", EqualValue = "a"
            };
            string str1 = "";

            Assert.Equal("", formatter1.Formate(str1));
            Assert.Equal("d", formatter1.Formate("a"));
            Assert.Equal("dd", formatter1.Formate("dd"));
        }
        public void DisplaceFormaterTest()
        {
            DisplaceFormater formatter1 = new DisplaceFormater {
                Displacement = "d", EqualValue = "a"
            };
            string str1 = "";

            Assert.AreEqual("", formatter1.Formate(str1));
            Assert.AreEqual("d", formatter1.Formate("a"));
            Assert.AreEqual("dd", formatter1.Formate("dd"));

            //DisplaceFormater formatter2 = new DisplaceFormater { Displacement = 3, EqualValue = 1 };
            //Assert.AreEqual(2, formatter2.Formate(2));
            //Assert.AreEqual(3, formatter2.Formate(1));
            //Assert.AreEqual("dd", formatter2.Formate("dd"));
        }