public void CreateNoteShouldSuccess()
        {
            Note note = new Note {
                CategoryId = 1, ReminderId = 1, NoteTitle = "Tech-Stack", NoteContent = "DotNet", NoteStatus = "Started", CreatedBy = "John"
            };

            var actual = repository.CreateNote(note);

            Assert.IsAssignableFrom <Note>(actual);
            Assert.Equal(2, actual.NoteId);
        }
Esempio n. 2
0
        /// <summary>
        /// Create a new note.
        /// </summary>
        public static void Create(int listId)
        {
            System.Console.WriteLine(">>> >>> Compose your note:");

            var input = System.Console.ReadLine();

            if (!string.IsNullOrEmpty(input))
            {
                NoteRepository.CreateNote(input, listId);
            }
        }