public void Rethink_WithoutSuccessorAndInvisibleDocument_ReturnsNullObject() { var archivist = new GetVisibleArchivist { Successor = null }; var document = new Document { IsVisible = false }; var result = archivist.Rethink(document); Assert.Null(result); }
public void Rethink_WithoutSuccessorAndVisibleDocument_ReturnsInitialObject() { var archivist = new GetVisibleArchivist { Successor = null }; var document = new Document { IsVisible = true }; var result = archivist.Rethink(document); Assert.Equal(document, result); }
public void Rethink_VisibleDocumentCallToSuccessor_ReturnsNullObject() { var archivistMock = new Mock <IArchivist>(); archivistMock.Setup(it => it.Successor).Returns((IArchivist)null); var archivist = new GetVisibleArchivist { Successor = archivistMock.Object }; var document = new Document { IsVisible = true }; var result = archivist.Rethink(document); Assert.Null(result); archivistMock.Verify(it => it.Rethink(document), Times.Once); }