Пример #1
0
        public void NotesControllerTestInitialize()
        {
            _service = new MockNotesService();
            _service.MockNotes.List.AddRange(
                new[]
                    {
                        CreateNote(1, TestUser1, DateTime.Now, "1", string.Empty, false),
                        CreateNote(2, TestUser1, DateTime.Now, "2", string.Empty, false),
                        CreateNote(3, TestUser1, DateTime.Now, "3", string.Empty, true),
                        CreateNote(4, TestUser1, DateTime.Now, "4", string.Empty, false),
                        CreateNote(5, TestUser1, DateTime.Now, "5", string.Empty, false),
                        CreateNote(6, TestUser1, DateTime.Now, "6", string.Empty, true),
                        CreateNote(7, TestUser1, DateTime.Now, "7", string.Empty, false),
                        CreateNote(8, TestUser1, DateTime.Now, "8", string.Empty, false),
                        CreateNote(9, TestUser1, DateTime.Now, "9", string.Empty, true),
                        CreateNote(10, TestUser1, DateTime.Now, "10", string.Empty, false),

                        CreateNote(11, TestUser2, DateTime.Now, "1", string.Empty, true),
                        CreateNote(12, TestUser2, DateTime.Now, "2", string.Empty, true),
                        CreateNote(13, TestUser2, DateTime.Now, "3", string.Empty, true),
                        CreateNote(14, TestUser2, DateTime.Now, "4", string.Empty, false),
                        CreateNote(15, TestUser2, DateTime.Now, "5", string.Empty, true),
                        CreateNote(16, TestUser2, DateTime.Now, "6", string.Empty, false),
                        CreateNote(17, TestUser2, DateTime.Now, "7", string.Empty, false),
                        CreateNote(18, TestUser2, DateTime.Now, "8", string.Empty, false),
                        CreateNote(19, TestUser2, DateTime.Now, "9", string.Empty, false),
                        CreateNote(20, TestUser2, DateTime.Now, "10", string.Empty, false)
                    });
            _saveCalled = false;
            _service.Saved += (s, e) => _saveCalled = true;
        }
Пример #2
0
 public void NotesControllerTestCleanup()
 {
     _service.Dispose();
     _service = null;
 }