public void TestUnexpectedFieldReps() { // Arrange var factory = new DefaultModelClassFactory(); var msh = new MSH(new GenericMessage.V25(factory), new DefaultModelClassFactory()); // Act msh.GetField(1, 0); msh.GetField(1, 1); // Assert Assert.AreEqual(2, msh.GetField(1).Length); }
public void TestEnsureEnoughFields() { // Arrange var factory = new DefaultModelClassFactory(); var msh = new MSH(new GenericMessage.V25(factory), factory); var n = msh.NumFields(); // Act msh.GetField(n + 3, 0); // Assert Assert.AreEqual(typeof(Varies), msh.GetField(n + 1, 0).GetType()); Assert.AreEqual(typeof(Varies), msh.GetField(n + 2, 0).GetType()); Assert.AreEqual(typeof(Varies), msh.GetField(n + 3, 0).GetType()); }