public void TestWrongGroupClosed()
 {
     Program.ExpectFailure <ProtoException>(() =>
     {
         Test3 t3 = Program.Build <Test3>(0x1B, 0x08, 0x96, 0x01, 0x24);// [start group 3] [test1] [end group 4]
     });
 }
 public void TestUnterminatedGroup()
 {
     Program.ExpectFailure <ProtoException>(() =>
     {
         Test3 t3 = Program.Build <Test3>(0x1B, 0x08, 0x96, 0x01);// [start group 3] [test1]
     });
 }
예제 #3
0
        public void PerfTestEmbedded(int count, bool runLegacy)
        {
            Test3 t3 = new Test3 {
                C = new Test1 {
                    A = 150
                }
            };

            Assert.IsTrue(LoadTestItem(t3, count, count, runLegacy, runLegacy, runLegacy, true, runLegacy, false, 0x1a, 0x03, 0x08, 0x96, 0x01));
        }
예제 #4
0
        public void EmbeddedMessageSample()
        {
            Test3 t3 = new Test3 {
                C = new Test1 {
                    A = 150
                }
            };

            Assert.IsTrue(Program.CheckBytes(t3, 0x1a, 0x03, 0x08, 0x96, 0x01));
        }
예제 #5
0
        public void EmbeddedMessageSample()
        {
            Test3 t3 = new Test3 {
                C = new Test1 {
                    A = 150
                }
            };

            Serializer.DeepClone(t3);
            // variant?
            //Assert.IsTrue(Program.CheckBytes(t3, 0x1a, 0x07,  0x10, 0x01, 0x52, 0x03, 0x08, 0x96, 0x01));
        }
예제 #6
0
 public void TestWrongGroupClosed()
 {
     Test3 t3 = Program.Build <Test3>(0x1B, 0x08, 0x96, 0x01, 0x24); // [start group 3] [test1] [end group 4]
 }
예제 #7
0
 public void TestUnterminatedGroup()
 {
     Test3 t3 = Program.Build <Test3>(0x1B, 0x08, 0x96, 0x01);// [start group 3] [test1]
 }
예제 #8
0
        public void TestGroup()
        {
            Test3 t3 = Program.Build <Test3>(0x1B, 0x08, 0x96, 0x01, 0x1C);// [start group 3] [test1] [end group 3]

            Assert.AreEqual(150, t3.C.A);
        }