public void RestoredItem_ChangesState_ToPreviousState() { item.State = ContentState.Published; TrashHandler th = CreateTrashHandler(); th.Throw(item); th.Restore(item); Assert.That(item.State, Is.EqualTo(ContentState.Published)); }
public void Drafts_AreNotPublished_WhenRestored() { TrashHandler th = CreateTrashHandler(); item.State = ContentState.Draft; th.Throw(item); th.Restore(item); item.State.ShouldBe(ContentState.Draft); }
public void ChildrenOf_RestoredItems_AreUnExpired() { TrashHandler th = CreateTrashHandler(); var child1 = CreateItem <ThrowableItem>(5, "child1", item); var child2 = CreateItem <ThrowableItem>(6, "child2", child1); th.Throw(item); th.Restore(item); Assert.That(child1.Expires, Is.Null); Assert.That(child2.Expires, Is.Null); }
public void DraftChildren_AreNotPublished_WhenRestored() { TrashHandler th = CreateTrashHandler(); var child1 = CreateItem <ThrowableItem>(5, "child1", item); child1.State = ContentState.Draft; th.Throw(item); th.Restore(item); child1.State.ShouldBe(ContentState.Draft); }
public void ChildrenOf_RestoredItems_AreUnExpired() { TrashHandler th = CreateTrashHandler(); var child1 = CreateItem <ThrowableItem>(5, "child1", item); var child2 = CreateItem <ThrowableItem>(6, "child2", child1); th.Throw(item); th.Restore(item); child1.State.ShouldBe(ContentState.Published); child2.State.ShouldBe(ContentState.Published); }