public void TestGetArchivedIem() { ItemSetUp(); Assert.IsNotNull(DomainRepository <T> .GetArchived(ArchivedItem.ObjectId)); Assert.IsNull(DomainRepository <T> .GetArchived(ActiveItem.ObjectId)); Assert.IsNull(DomainRepository <T> .GetArchived(ActiveDeletedItem.ObjectId)); Assert.IsNull(DomainRepository <T> .GetArchived(ArchivedDeletedItem.ObjectId)); Assert.IsNull(DomainRepository <T> .GetArchived(DraftDeletedItem.ObjectId)); Assert.IsNull(DomainRepository <T> .GetArchived(DraftItem.ObjectId)); }
public void TestGetArchivedIemAfterUnDelete() { ItemSetUp(); With.Transaction(delegate { DomainRepository <T> .UnDelete(ArchivedDeletedItem); }); Assert.IsNotNull(DomainRepository <T> .GetArchived(ArchivedDeletedItem.ObjectId)); Assert.IsNotNull(DomainRepository <T> .Get(ArchivedDeletedItem.ObjectId)); }
public virtual T GetArchived(int id) { try { Authorize(Can_Read); return(DomainRepository <T> .GetArchived(id)); } catch (System.Exception ex) { bool reThrow = ExceptionHandler.HandleBusinessLogicLayerException(ex); if (reThrow) { throw; } return(null); } }