public void RemoveDocumentThrowsArgumentNullExceptionIfDocumentIsNull() { var noteBookCollection = new NotebookCollection(); noteBookCollection.CreateNotebook("notebook"); noteBookCollection.RemoveDocument("notebook", null); }
public void RemoveDocumentFromNotebookThrowsInvalidOperationExceptionIfDocumentDoesntExist() { var noteBookCollection = new NotebookCollection(); noteBookCollection.CreateNotebook("notebook"); var document = new Document(@"c:\fileExists.scp", "myDocument1", new TestFileProxy()); var document2 = new Document(@"c:\fileExists.scp", "myDocument2", new TestFileProxy()); var document3 = new Document(@"c:\fileExists.scp", "DoesNotExist", new TestFileProxy()); noteBookCollection.AddDocumentToNotebook("notebook", document); noteBookCollection.AddDocumentToNotebook("notebook", document2); Assert.AreEqual(2, noteBookCollection.DocumentCount("notebook")); noteBookCollection.RemoveDocument("notebook", document3); }
public void RemoveDocumentFromNotebookRemovesDocuments() { var noteBookCollection = new NotebookCollection(); noteBookCollection.CreateNotebook("notebook"); var document = new Document(@"c:\fileExists.scp", "myDocument1", new TestFileProxy()); var document2 = new Document(@"c:\fileExists.scp", "myDocument2", new TestFileProxy()); noteBookCollection.AddDocumentToNotebook("notebook", document); noteBookCollection.AddDocumentToNotebook("notebook", document2); Assert.AreEqual(2, noteBookCollection.DocumentCount("notebook")); noteBookCollection.RemoveDocument("notebook", document); Assert.AreEqual(1, noteBookCollection.DocumentCount("notebook")); }