예제 #1
0
        public void GivenNewNotesListContext_GetNotes_ShouldReturnEmptyCollection()
        {
            var expectedEmpty = Array.Empty <Note>();

            var context = new NotesListContext();

            var actualNotes = context.ListAllNotes();

            CollectionAssert.AreEqual(expectedEmpty, actualNotes.ToList());
        }
예제 #2
0
        public void GivenNewNotesListContext_AddNote_ShouldAddTheNote_SoThatGetNotesReturnsIt()
        {
            var expectedNote = new Note();

            var context = new NotesListContext();

            context.AddNote(expectedNote);

            var actualNotes = context.ListAllNotes();

            CollectionAssert.Contains(actualNotes.ToList(), expectedNote);
        }