def test_delete_empty_argument(self): notes = NotesApplication() notes.create("We are the syndicate") notes.create("You mission if you choose to accept") self.assertEqual(notes.delete("two"), None, msg="Supposed to be return same result for 'two'")
def test_search_notes1(self): author_notes = NotesApplication('New Author', ["Content1", "Content2", "Content3"]) notes_list = author_notes.search("Content4") self.assertListEqual(notes_list, [], msg='search should return an empty array text is not found in any notes')
def test_notes_create_3(self): notes = NotesApplication('Author') notes.create("Content") length = len(notes.notes) self.assertEqual(length, 1, msg='new note was not created')
def testDelete(self): New_Note = NotesApplication("Am a New author") Note = New_Note.create("This Note is to be deleted") self.assertNotEqual("This Note is to be deleted", New_Note.delete(Note))
def test_addedSuccessfully(self): test = NotesApplication("",[]) self.assertEqual(test.create("Allen Notes"),test.get(0)+" added")
def test_search_empty_field(self): notes = NotesApplication() notes.create("The final day has been awesome and mixed") notes.create("the final day some people will leave") self.assertEqual(notes.search(), None, msg="Supposed to be an empty return")
def test_get_boolean_as_index(self): notes = NotesApplication() self.assertEqual(notes.get(True), None, msg="List is not empty")
def test_Alpha(self): notes = NotesApplication() self.assertEqual(notes.get('something'), None, msg="Out of alphabet")
def test_create_with_empty_string(self): notes = NotesApplication('Author') notes.create('') length = len(notes.notes) self.assertEqual(length, 0, msg='No String was passed in, A note is not to be created')
def test_app_create(self): notes = NotesApplication("Allen") note_id = notes.create("Your Time starts now") self.assertEqual(notes.note_list[note_id], msg = "Your Time starts now")