예제 #1
0
        public void AddTest()
        {
            IContentContainer container = getContainer();
            TestContentType   c         = TestContentType.getARandomTestContentType(enforce_a_reference: true);

            container.Add(c.single_reference.value);
            foreach (var r in c.multi_reference)
            {
                container.Add(r.value);
            }
            container.Add(c);
            Guid guid = c.guid;
            var  back_from_container = container.GetContent <TestContentType>(guid);

            Assert.AreEqual(c.guid, back_from_container.guid);
            Assert.IsTrue(c.samePropertiesValue(back_from_container));
            Assert.AreEqual(c.GetType(), back_from_container.GetType());
        }