Пример #1
0
        public void FetchesOneByCorrectId(string id)
        {
            var viewChapter = new ViewChapter(this);

            viewChapter.Execute(new
            {
                Id = id
            }.ToDynamic());

            _lastId.Should().Be(id);
        }
Пример #2
0
        public void CanViewAChapter(string id, string name, string description)
        {
            _chapter = new Domain.Chapter
            {
                Id          = id,
                Name        = name,
                Description = description
            };

            var viewChapter = new ViewChapter(this);

            dynamic response = viewChapter.Execute(new
            {
                Id = "asd"
            }.ToDynamic());

            ((string)response.Id).Should().Be(id);
            ((string)response.Name).Should().Be(name);
            ((string)response.Description).Should().Be(description);
        }
Пример #3
0
 public void SetUp()
 {
     _chapterGateway = new InMemoryChapter();
     _createChapter  = new CreateChapter(_chapterGateway);
     _viewChapter    = new ViewChapter(_chapterGateway);
 }