Ejemplo n.º 1
0
      public void Model_Is_ImageView()
      {
         ImageController controller = new ImageController();

         ActionResult result = controller.Index(new Guid("57c95cb2-dea3-486b-a951-d650e346ab59"), Principals.Collector);
         ViewResult viewResult = result as ViewResult;
         Assert.IsInstanceOfType(typeof(ImageView), viewResult.ViewData.Model);
      }
Ejemplo n.º 2
0
      public void Should_Return_View_Result()
      {
         ImageController controller = new ImageController();

         ActionResult result = controller.Index(new Guid("57c95cb2-dea3-486b-a951-d650e346ab59"), Principals.Collector);

         Assert.IsInstanceOfType(typeof(ViewResult), result);
      }
Ejemplo n.º 3
0
      public void Is_Publid_Is_True_For_Public_Image()
      {
         ImageController controller = new ImageController();

         ActionResult result = controller.Index(new Guid("57c95cb2-dea3-486b-a951-d650e346ab59"), Principals.Collector);
         ViewResult viewResult = result as ViewResult;
         ImageView image = viewResult.ViewData.Model as ImageView;
         Assert.IsTrue(image.IsPublic);
      }
Ejemplo n.º 4
0
      public void Result_Has_No_Name_And_Contains_A_Model()
      {
         ImageController controller = new ImageController();

         ActionResult result = controller.Index(new Guid("57c95cb2-dea3-486b-a951-d650e346ab59"), Principals.Collector);
         ViewResult viewResult = result as ViewResult;

         Assert.IsEmpty(viewResult.ViewName);
         Assert.IsNotNull(viewResult.ViewData.Model);
      }