Exemplo n.º 1
0
        public void VersionsController_Show_CallsTheGetVersionsMethodOnTheService()
        {
            var document = new StubDocument();

            _versionsController.Show(document, 1);

            A.CallTo(() => _documentVersionsAdminService.GetVersions(document, 1)).MustHaveHappened();
        }
Exemplo n.º 2
0
        public void VersionsController_Show_ReturnsTheResultOfTheServiceCallAsTheModel()
        {
            var document = new StubDocument();
            var versionsModel = new VersionsModel(PagedList<DocumentVersion>.Empty, document.Id);
            A.CallTo(() => _documentVersionsAdminService.GetVersions(document, 1)).Returns(versionsModel);

            PartialViewResult result = _versionsController.Show(document, 1);

            result.Model.Should().Be(versionsModel);
        }
Exemplo n.º 3
0
 public void VersionsController_Show_ReturnsPartialViewResult()
 {
     var document = new StubDocument();
     _versionsController.Show(document, 1).Should().BeOfType<PartialViewResult>();
 }