public void Test1()
        {
            ITransform transform = new DataBroker();
            string     data      = "1X2X";

            Assert.AreEqual("1Y2Y", transform.Transform(data));

            ISetter setter = new DataBroker();

            data = "H:123";
            Assert.AreEqual("H:123:T", setter.Append(data));
        }
Esempio n. 2
0
        public void Test()
        {
            string data;

            // 从ITransform 的角度看
            ITransform transform = new DataBroker();

            data = "1X2X";
            Assert.AreEqual <string>("1Y2Y", transform.Transform(data));

            // 从ISetter 的角度看
            ISetter setter = new DataBroker();

            data = "H:123";
            Assert.AreEqual <string>("H:123:T", setter.Append(data));
        }