示例#1
0
        public void PartialLetterTest()
        {
            var m2 = new FixedWidthMessage(encoder1, "01010");

            unitUnderTest = new FixedWidthDeserializer(m2);

            Assert.IsTrue(unitUnderTest.MoveNext(), "Initial MoveNext()");

            Assert.AreEqual('A', unitUnderTest.Current, "First Letter");
            Assert.IsTrue(unitUnderTest.MoveNext(), "Second MoveNext()");
            Assert.AreEqual('A', unitUnderTest.Current, "Second Letter");
            Assert.IsFalse(unitUnderTest.MoveNext(), "MoveNext should fail on partial letter");
        }
示例#2
0
        public void EmptyCodeTest()
        {
            var m3 = new FixedWidthMessage(encoder1, "");

            unitUnderTest = new FixedWidthDeserializer(m3);

            Assert.IsFalse(unitUnderTest.MoveNext(), "Should not be able to move next on empty string");
        }
示例#3
0
 public void MinimalTest()
 {
     unitUnderTest.MoveNext();
     Assert.AreEqual('A', unitUnderTest.Current);
 }