public override void Arrange() { base.Arrange(); MockViewBuilder.Setup(b => b.BuildUpdateView <TestEntity>(It.IsAny <TestEntity>())).Returns(new UpdateView()); Controller.ModelState.AddModelError("Id", "Id is not here"); }
public override void Arrange() { base.Arrange(); _model = new TestEntity { Id = 1 }; MockViewBuilder.Setup(b => b.BuildDetailsView <TestEntity>(_model)).Returns(new DetailsView()); }
public override void Arrange() { base.Arrange(); MockViewBuilder.Setup(b => b.BuildIndexView <TestEntity>(null, null, "key", "asc", It.IsAny <IEnumerable <string> >(), It.IsAny <IEnumerable <string> >(), It.IsAny <string>(), null)) .Returns(new IndexView(typeof(TestEntity).AssemblyQualifiedName)); ControllerTestHelper.SetContext(Controller, "_TableBody", "_Pager"); }
public override void Arrange() { base.Arrange(); MockViewBuilder.Setup(b => b.BuildIndexView <TestEntity>( It.IsAny <int?>(), It.IsAny <int?>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <IEnumerable <string> >(), It.IsAny <IEnumerable <string> >(), It.IsAny <string>(), It.IsAny <IIndexViewVisitor[]>() )) .Returns(new IndexView(typeof(TestEntity).Name)); }
public override void Arrange() { base.Arrange(); MockViewBuilder.Setup(b => b.GetIndexFilterOptions <TestEntity>(null)).Returns(new List <FilterOption> { new FilterOption { Label = "Column Name", Children = new List <FilterOption> { new FilterOption { Label = "Option One" } } } }); }
public override void Arrange() { base.Arrange(); Entity = new TestEntity { Id = 1 }; Results = new List <ActionResult>(); MockViewBuilder.Setup(b => b.BuildUpdateView <TestEntity>(Entity)).Returns(new UpdateView()); MockRepository.Setup(r => r.Update(It.IsAny <TestEntity>(), "AnotherEntities", "AnotherEntity", "OtherAnotherEntities", "RequiredEntity", "ForeignKey")).Returns(Entity); }
public override void Arrange() { base.Arrange(); MockViewBuilder.Setup(b => b.BuildUpdateView <TestEntity>(1)).Returns(new UpdateView()); }