Beispiel #1
0
        public async Task DeleteTaskTest()
        {
            var service = new OneNoteService();
            var pageId  = new Dictionary <string, string>();

            await service.InitAsync(MockData.Token, pageId, mockClient);

            var taskList = await service.GetTasksAsync(MockData.ToDo);

            await service.DeleteTasksAsync(MockData.ToDo, taskList.GetRange(0, 1));

            var deletedTaskList = await service.GetTasksAsync(MockData.ToDo);

            Assert.IsTrue(taskList.Count == deletedTaskList.Count + 1);
            Assert.IsFalse(deletedTaskList.Contains(taskList[0]));
        }
Beispiel #2
0
        public async Task DeleteTaskTest()
        {
            var service = new OneNoteService();
            var pageId  = new Dictionary <string, string>()
            {
                { "ToDo", "ToDo" }, { "Grocery", "Grocery" }, { "Shopping", "Shopping" }
            };

            await service.InitAsync("test", pageId, mockClient);

            var taskList = await service.GetTasksAsync("ToDo");

            await service.DeleteTasksAsync("ToDo", taskList.GetRange(0, 1));

            var deletedTaskList = await service.GetTasksAsync("ToDo");

            Assert.IsTrue(taskList.Count == deletedTaskList.Count + 1);
            Assert.IsFalse(deletedTaskList.Contains(taskList[0]));
        }