示例#1
0
        public void TestDeleteDraftItem()
        {
            ItemSetUp();

            With.Transaction(delegate
            {
                DomainRepository <T> .Delete(DraftItem);
            });
            Assert.IsNull(DomainRepository <T> .GetGlobal(DraftItem.ObjectId));
            Assert.IsNull(DomainRepository <T> .GetDraft(DraftItem.ObjectId));
        }
示例#2
0
        public void TestGetGlobal()
        {
            ItemSetUp();

            Assert.IsNotNull(DomainRepository <T> .GetGlobal(ActiveItem.ObjectId));
            Assert.IsNotNull(DomainRepository <T> .GetGlobal(ArchivedItem.ObjectId));
            Assert.IsNotNull(DomainRepository <T> .GetGlobal(ActiveDeletedItem.ObjectId));
            Assert.IsNotNull(DomainRepository <T> .GetGlobal(ArchivedDeletedItem.ObjectId));
            Assert.IsNotNull(DomainRepository <T> .GetGlobal(DraftItem.ObjectId));

            Assert.IsNull(DomainRepository <T> .GetGlobal(DraftDeletedItem.ObjectId));
        }