Beispiel #1
0
        public async Task DeleteNote()
        {
            NotesApiController notesController = new NotesApiController();

            tblNote tblNote = new tblNote();

            tblNote.ID = 7;

            tblNote.Mode     = "3";
            tblNote.IsDelete = 1;

            var result = await notesController.AddNote(tblNote);

            Assert.AreEqual(1, result);
        }
Beispiel #2
0
        public async Task UpdateNote()
        {
            NotesApiController notesController = new NotesApiController();

            tblNote tblNote = new tblNote();

            tblNote.ID        = 9;
            tblNote.Title     = "repos";
            tblNote.Content   = "hello,hey";
            tblNote.IsPin     = 0;
            tblNote.ColorCode = "white";
            tblNote.Mode      = "2";
            tblNote.IsTrash   = 0;
            tblNote.IsActive  = 0;

            var result = await notesController.AddNote(tblNote);

            Assert.AreEqual(1, result);
        }
Beispiel #3
0
        public async Task AddNote()
        {
            NotesApiController notesController = new NotesApiController();

            tblNote tblNote = new tblNote();

            tblNote.Title     = "testnote";
            tblNote.Content   = "this is my content";
            tblNote.IsPin     = 0;
            tblNote.ColorCode = "black";
            tblNote.Mode      = "1";
            tblNote.IsTrash   = 1;
            tblNote.IsActive  = 0;
            var result = await notesController.AddNote(tblNote);

            Assert.AreEqual(1, result);

            Assert.IsNotNull(result);
        }