public void GetDiaryTest002()
        {
            var diaryList = new List <Diary>();

            mockRepository.Setup(x => x.Read(1)).Returns(diaryList);
            var service = new EditService(mockRepository.Object);

            var result = service.GetDiary(1);

            Assert.Null(result);
        }
        public void GetDiaryTest001()
        {
            var diaryList = new List <Diary>();

            diaryList.Add(new Diary(1, "たいとる(てすと)", "ほんぶん(てすと)"));
            mockRepository.Setup(x => x.Read(1)).Returns(diaryList);
            var service = new EditService(mockRepository.Object);

            var result = service.GetDiary(1);
            var model  = Assert.IsType <EditViewModel>(result);

            Assert.Equal("1", result.Id);
            Assert.Equal("たいとる(てすと)", result.Title);
            Assert.Equal("ほんぶん(てすと)", result.Content);
        }