Exemplo n.º 1
0
 public void CreateIspitParam()
 {
     var repMock = new Mock<IFakultetRepository<Ispits>>();
     Ispits ispit = new Ispits() { IspitID = 1, Naziv = "Ispit1" };
     repMock.Setup(x => x.InsertEntity(ispit));
     controller = new IspitsController(repMock.Object);
     var result = controller.Create(ispit) as RedirectToRouteResult;
     repMock.VerifyAll();
     Assert.AreEqual("Index", result.RouteValues["Action"]);
 }
Exemplo n.º 2
0
 public void Create()
 {
     controller = new IspitsController();
     ViewResult result = controller.Create() as ViewResult;
     Assert.AreEqual("Create", result.ViewName);
 }