Пример #1
0
 public void RedirectWithParams()
 {
     var controller = new SmartTest2Controller();
     PrepareController(controller);
     controller.Redirect<SmartTest2Controller>(c => c.ActionWithParams(1, "one"));
     Assert.AreEqual("/SmartTest2/ActionWithParams.rails?something=1&somethingElse=one&", Response.RedirectedTo);
 }
Пример #2
0
 public void RedirectWithParamsAndDataBinding()
 {
     var controller = new SmartTest2Controller();
     PrepareController(controller);
     controller.Redirect<SmartTest2Controller>(c => c.DataBinding(new Properties {SomeValue = 22}));
     Assert.AreEqual("/SmartTest2/DataBinding.rails?prefi.SomeValue=22&", Response.RedirectedTo);
 }