예제 #1
0
        public async Task AddTask()
        {
            var mock = new Mock <IToDoListRepository>();

            mock.Setup(m => m.loadTasks());

            var tdlService = new ToDoListApp.Service.ToDoListService(mock.Object);

            Assert.IsNotNull(tdlService.addTask(100, "New task by Mock"));
        }
예제 #2
0
        public void LoadTasks()
        {
            var mock = new Mock <IToDoListRepository>();

            mock.Setup(m => m.loadTasks());

            var tdlService = new ToDoListApp.Service.ToDoListService(mock.Object);

            Assert.IsNotNull(mock.Object);
        }