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"); }
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"); }
public void MinimalTest() { unitUnderTest.MoveNext(); Assert.AreEqual('A', unitUnderTest.Current); }