public void ReadTest() { OscTimeTag timestamp = new OscTimeTag(14236589681638796952); OscMessage[] messages = new OscMessage[] { UnitTestHelper.Message_Array_Ints(), UnitTestHelper.Message_Array_Ints() }; OscBundle expected = new OscBundle(timestamp, messages); byte[] bytes = expected.ToByteArray(); int index = 0; int count = bytes.Length; OscBundle actual; actual = OscBundle.Read(bytes, index, count); UnitTestHelper.AreEqual(expected, actual); Assert.IsTrue(actual.Equals(expected)); }
public void OscBundleConstructorTest() { OscTimeTag timestamp = new OscTimeTag(14236589681638796952); OscMessage[] messages = new OscMessage[] { UnitTestHelper.Message_Array_Ints(), UnitTestHelper.Message_Array_Ints() }; OscBundle target = new OscBundle(timestamp, messages); Assert.AreEqual(timestamp, target.Timestamp); UnitTestHelper.AreEqual(messages, target.ToArray()); }