Esempio n. 1
0
        public void DetailPublisher_GetValidItems_ReturnViewResult()
        {
            //Arrange
            _mockPublisher.Setup(a => a.GetByName(It.IsAny <string>())).Returns(new PublisherDTO()).Verifiable();

            //Act
            var res = _controller.Details("name");

            // Assert
            Assert.AreEqual(typeof(ViewResult), res.GetType());
        }
        public void DetailsTest()
        {
            // Arrange
            PublishersController controller = new PublishersController();

            // Act
            var result = controller.Details(1);

            // Assert
            Assert.IsNotNull(result);
        }