public ActionResult Create()
        {
            var from = Convert.ToDateTime(Request.Form["start"]);
            var to   = Convert.ToDateTime(Request.Form["end"]);
            var name = Request.Form["title"];

            var inputData  = new ScheduleCreateInputData(from, to, name);
            var outputData = _scheduleCreateUseCase.Handle(inputData);

            var viewModel = _scheduleCreatePresenter.CreateViewModel(outputData);

            return(Content(JsonConvert.SerializeObject(viewModel)));
        }
        public void HandleTest()
        {
            var usecase = new ScheduleCreateUseCase(_mockRepository.Object);

            var inputData = new ScheduleCreateInputData(_from, _to, _name);

            var outputData = usecase.Handle(inputData);

            try
            {
                // リポジトリが正しく呼び出されているかチェック
                _mockRepository.Verify(x => x.Create(_from, _to, _name), Times.Once());
            }
            catch (MockException e)
            {
                Assert.Fail(e.Message);
            }

            Assert.AreEqual(outputData.Schedule.DateTimeFrom, _from);
            Assert.AreEqual(outputData.Schedule.DateTimeTo, _to);
            Assert.AreEqual(outputData.Schedule.Name, _name);
        }