Пример #1
0
        public void CreateBoundEventFrame()
        {
            AFElement ele = ElementTests.GenerateElement();

            _db.CreateElement(ele);
            ele = _db.Elements[ele.Name];

            Assert.IsNotNull(ele, "Assert that element exists in AFDB");

            //TODO: Determine the flow of the AFSDK and implement
        }
Пример #2
0
        public void CreateElement()
        {
            AFElement element = GenerateElement();

            Console.WriteLine("Test element creation.");
            Assert.IsTrue(_db.CreateElement(element), "Assert creation passed");

            //Check that the the element can be found through the AFDB
            Assert.IsNotNull(_db.Elements[element.Name], "Check AFDB element collection for new element.");
            Assert.IsNotNull(AFElement.Find(_conn, element.WebID));
            Assert.IsNotNull(AFElement.FindByPath(_conn, element.Path));
            //Assert.IsNotNull(AFElement.FindByTemplate());
            //Assert.IsNotNull(AFElement.FindByCategory(_conn, element.Categories.First()));

            //TODO: There should be more tests for finding the element
            element.Delete();
            Assert.IsTrue(element.IsDeleted);
            element.CheckIn();

            Assert.IsNull(AFElement.Find(_conn, element.WebID));
        }