コード例 #1
0
        public void CanRespondWithTheId(string id)
        {
            _id = id;
            var     createChapter = new CreateChapter(this);
            dynamic response      = createChapter.Execute(new
            {
                Name        = "Unused",
                Description = "Unused"
            }.ToDynamic());

            ((string)response.Id).Should().Be(id);
        }
コード例 #2
0
        public void CanCreateChapter(string name, string description)
        {
            var createChapter = new CreateChapter(this);

            createChapter.Execute(new
            {
                Name        = name,
                Description = description
            }.ToDynamic());

            _lastSavedChapter.Name.Should().Be(name);
            _lastSavedChapter.Description.Should().Be(description);
        }
コード例 #3
0
ファイル: ChapterTests.cs プロジェクト: craigjbass/Chapter
 private dynamic CreateChapter(object request) => _createChapter.Execute(request.ToDynamic());