public void Rethink_NullDocumentWithoutSuccessor_ReturnsNull() { var archivist = new DoNothingArchivist { Successor = null }; var result = archivist.Rethink(null); Assert.Null(result); }
public void Rethink_WithoutSuccessor_ReturnsInitialObject() { var archivist = new DoNothingArchivist { Successor = null }; var document = new Document(); var result = archivist.Rethink(document); Assert.Equal(document, result); }
public void Rethink_WithSuccessor_CallsSuccessor() { var archivist = new DoNothingArchivist(); var archivistMock = new Mock <IArchivist>(); archivistMock.Setup(it => it.Successor).Returns((IArchivist)null); archivist.Successor = archivistMock.Object; var document = new Document(); archivist.Rethink(document); archivistMock.Verify(it => it.Rethink(document), Times.Once); }