This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% using (Html.BeginForm("Create", "Login")) {%> | |
| //Creates | |
| <form action="/login/create" method="post"> | |
| <% using (Html.BeginForm<LoginController>(x => x.Create(Model))) {%> | |
| //Creates | |
| <form action="/Login/Create?model=Graphite.Web.Controllers.Login.LoginViewModel" method="post"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //This is the route definition | |
| public class Routes : RouteSet{ | |
| public Routes() { | |
| Map("").To<HomeController>(x => x.Index()); | |
| Area<HomeController>("", () => | |
| Map("").To<HomeController>(x => x.Index())); | |
| Map("rss").To<FeedController>(x => x.Rss()); | |
| Map("atom").To<FeedController>(x => x.Atom()); | |
| Resources<PostController>( | |
| () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected static HttpPostedFileBase MockFileUpload(ControllerBase controller) | |
| { | |
| var request = MockRepository.GenerateStub<HttpRequestBase>(); | |
| var context = MockRepository.GenerateStub<HttpContextBase>(); | |
| var server = MockRepository.GenerateStub<HttpServerUtilityBase>(); | |
| var postedfile = MockRepository.GenerateMock<HttpPostedFileBase>(); | |
| var postedfilesKeyCollection = MockRepository.GenerateStub<HttpFileCollectionBase>(); | |
| var fakeFileKeys = new List<string> { "image", "file" }; | |
| context.Stub(ctx => ctx.Request).Return(request); | |
| context.Stub(ctx => ctx.Server).Return(server); |
NewerOlder