Example #1
0
 private void checkRecursiveDefinition(TestRecursiveDefinetion decoded, TestRecursiveDefinetion standard)
 {
     Assert.AreEqual(decoded.Name, standard.Name);
     if (standard.Value != null)
     {
         Assert.IsNotNull(decoded.Value);
         checkRecursiveDefinition(decoded.Value, standard.Value);
     }
 }
Example #2
0
        public virtual TestRecursiveDefinetion createTestRecursiveDefinition()
        {
            TestRecursiveDefinetion result    = new TestRecursiveDefinetion();
            TestRecursiveDefinetion subResult = new TestRecursiveDefinetion();

            result.Name    = "aaaaa";
            subResult.Name = "bbbbb";
            result.Value   = subResult;
            return(result);
        }
Example #3
0
        public virtual void testRecursiveDefinition()
        {
            IDecoder decoder = newDecoder();

            System.IO.MemoryStream  stream = new System.IO.MemoryStream((coderTestUtils.createTestRecursiveDefinitionBytes()));
            TestRecursiveDefinetion seq    = decoder.decode <TestRecursiveDefinetion>(stream);

            Assert.IsNotNull(seq);
            checkRecursiveDefinition(seq, coderTestUtils.createTestRecursiveDefinition());
        }