public void CreateRecord_WithEmptyText_ThrowArgumentNullException() { NoteBookService noteBook = NoteBookService.GetInstance(); Assert.Throws <ArgumentException>(() => noteBook.CreateRecord("lalala", " ", "PashaFast"), "conent must not be empty"); }
public void CreateRecord_WithNullText_ThrowArgumentNullException() { NoteBookService noteBook = NoteBookService.GetInstance(); Assert.Throws <ArgumentNullException>(() => noteBook.CreateRecord("first", null, "PashaFast"), "content must not be null"); }
public void CreateRecord_WithEmptyTitle_ThrowArgumentNullException() { NoteBookService noteBook = NoteBookService.GetInstance(); Assert.Throws <ArgumentNullException>(() => noteBook.CreateRecord(null, "some text", "PashaFast"), "title must not be empty"); }
public void CreateRecord_WithNullTitle_ThrowArgumentNullException() { NoteBookService noteBook = NoteBookService.GetInstance(); Assert.Throws <ArgumentNullException>(() => noteBook.CreateRecord(null, "blblabla", "PashaFast"), "title must not be null"); }
public void CreateRecord_WithOneNote() { NoteBookService noteBook = NoteBookService.GetInstance(); noteBook.CreateRecord("first", "blblabla", "PashaFast"); string actual = noteBook.ToString(); string expected1 = $"#1, first, {DateTime.Now}, blblabla; "; string expected = $"#1, first was written by PashaFast in {DateTime.Now}. Add has next text blblabla; "; Assert.AreEqual(expected, actual); }