Пример #1
0
        public void BeerIndex()
        {
            // Arrange
            BeerController controller = new BeerController();

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
 public void Test_Get_Index()
 {
     using (var cluster = new Cluster())
     {
         using (var bucket = cluster.OpenBucket("beer-sample"))
         {
             var controller = new BeerController(new BeerRepository(bucket));
             var result     = (ViewResult)controller.Index();
             var beers      = result.Model as IEnumerable <dynamic>;
             Assert.AreEqual(10, beers.Count());
         }
     }
 }
Пример #3
0
        public void Index_Returns_ViewResult()
        {
            var result = underTest.Index();

            Assert.IsType <ViewResult>(result);
        }