示例#1
0
        public async Task UpdateDiary_ChangeContents()
        {
            var date = DateTime.Today;
            var text = "test content";

            var content = await _diaryService.WriteDiaryAsync(_user, _diary, date, text);

            content.Text = "modified content";
            await _diaryService.UpdateDiaryAsync(_user, _diary, new List <DiaryContent> {
                content
            });

            var view = await _diaryService.GetDiaryViewAsync(_user, _diary, date);

            var modified = view.DiaryContents.First();

            Assert.Equal(content.Text, modified.Text);
        }