Beispiel #1
0
        public void TestArraySerialisation()
        {
            var data = new object[] { 1, 2f, "foo" };
            var msg  = new OscMessage("/test", data);

            var expected = CreateExpectedDataArray();

            msg.TypeTag.Should().Be(",[ifs]");
            OscValidation.AssertSamePacket(expected, msg.ToByteArray());
        }
Beispiel #2
0
        public void TestArraySerialisation3()
        {
            var msg = new OscMessage("/test", new object[] { 1, 2f, "foo" });

            msg.Append(1); // the last argument is an integer.

            var expected = CreateExpectedDataArray3();

            msg.TypeTag.Should().Be(",[ifs]i");
            OscValidation.AssertSamePacket(expected, msg.ToByteArray());
        }
Beispiel #3
0
        public void TestArraySerialisation4()
        {
            var msg = new OscMessage("/test", new object[] { 1, 2f, "foo" });

            var blob = CreateTestBlob();

            msg.Append(blob); // the last argument is a blob.

            var expected = CreateExpectedDataArray4();

            msg.TypeTag.Should().Be(",[ifs]b");
            OscValidation.AssertSamePacket(expected, msg.ToByteArray());
        }