示例#1
0
        public void ReadMixedLinkedSet()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getMixedLinkedSetTestData();
            Object obj = CyclicXmlHandler.Read(testData.xml);

            AreSetsEqual((ISet <Object>)testData.obj, (ISet <Object>)obj);
        }
示例#2
0
        public void ReadMixedArray()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getMixedArrayTestData();
            object obj = CyclicXmlHandler.Read(testData.xml);

            AreArraysEqual((object[])testData.obj, (object[])obj);
        }
示例#3
0
        public void ReadMixedList()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getMixedListTestData();
            Object obj = CyclicXmlHandler.Read(testData.xml);

            AreCollectionsEqual((ICollection)testData.obj, (ICollection)obj);
        }
示例#4
0
        public void ReadCreatedAndExistingChildrenJavaXML()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getCreatedAndExistingChildrenTestData();
            Object obj = CyclicXmlHandler.Read(testData.xmlJava);

            AssertEquals((EntityA)testData.obj, (EntityA)obj);
        }
示例#5
0
        public void ReadEntityWithRelation()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getEntityWithRelationTestData();
            Object obj = CyclicXmlHandler.Read(testData.xml);

            Assert.AssertEquals(testData.obj, obj);
        }
示例#6
0
        public void ReadServiceDescription()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getServiceDescriptionTestData();
            Object obj = CyclicXmlHandler.Read(testData.xml);

            De.Osthus.Ambeth.Transfer.Assert.AssertEquals((ServiceDescription)testData.obj, (ServiceDescription)obj);
        }
示例#7
0
        public void ReadUpdatedEntityJavaXML()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getUpdatedEntityTestData();
            Object obj = CyclicXmlHandler.Read(testData.xmlJava);

            Assert.AssertEquals(testData.obj, obj);
            AssertEquals((Material)testData.obj, (Material)obj);
        }
示例#8
0
        public void ReadCreatedParentAndChildEntitiesJavaXML()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getCreatedParentAndChildEntitiesTestData();
            Object obj = CyclicXmlHandler.Read(testData.xmlJava);

            Assert.AssertTrue(obj is Material);
            AssertEquals((Material)testData.obj, (Material)obj);
        }
示例#9
0
        public void ReadCreatedParentAndChildEntitiesInListJavaXML()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getCreatedParentAndChildEntitiesInListTestData();
            Object obj = CyclicXmlHandler.Read(testData.xmlJava);

            Assert.AssertTrue(obj is IList);
            IList <Object> actuals = (IList <Object>)obj;

            AssertEquals((Material)((IList <Object>)testData.obj)[0], (Material)actuals[0]);
        }
示例#10
0
        public void ReadCreatedAndUpdatedEntitiesJavaXML()
        {
            InitManually(GetType());
            OriWrapperTestBed.TestData testData = OriWrapperTestBed.getCreatedAndUpdatedEntitiesTestData();
            Object        obj       = CyclicXmlHandler.Read(testData.xmlJava);
            List <Object> expecteds = (List <Object>)testData.obj;
            List <Object> actuals   = (List <Object>)obj;

            Assert.AssertEquals(expecteds.Count, actuals.Count);
            for (int i = 0; i < expecteds.Count; i++)
            {
                Material expected = expecteds[i] as Material;
                Material actual   = actuals[i] as Material;
                AssertEquals(expected, actual);
            }
        }