Esempio n. 1
0
        public void Todo全件取得()
        {
            var title    = "タイトル";
            var deadline = new DateTime(2021, 12, 31);
            var count    = 3;

            try
            {
                for (var i = 0; i < count; i++)
                {
                    var command = new TodoSaveCommand(title, deadline);
                    _todoUseCase.Save(command);
                }
            }
            catch (Exception e)
            {
                Assert.Fail(e.Message);
            }

            var result = _todoUseCase.GetAll();

            Assert.AreEqual(count, result.Todos.Count);

            foreach (var todo in result.Todos)
            {
                Assert.AreEqual(title, todo.Title);
                Assert.AreEqual(deadline, todo.Deadline);
                Assert.AreEqual(false, todo.IsCompleted);
            }
        }
Esempio n. 2
0
        public override void Initialize(INavigationParameters parameters)
        {
            base.Initialize(parameters);

            var result = _useCase.GetAll();

            result.Todos.ForEach(x => Todos.Add(new TodoListPageViewModelTodo(x)));
        }
Esempio n. 3
0
        public void Initialize()
        {
            var result = _useCase.GetAll();

            result.Todos.ForEach(x => Todos.Add(new TodoListPageModelTodo(x)));
        }