Advertisement
ivaylokenov

Untitled

Nov 18th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. [Fact]
  2. public void GetCreateShouldBeRoutedCorrectly()
  3.     => MyRouting                                  // Start a route test.
  4.         .Configuration()                          // Use the globally registered configuration.
  5.         .ShouldMap(request => request             // Provide the request data.
  6.             .WithLocation("/Articles/Create")     // Set the URL of the Get request.
  7.             .WithUser())                          // Specify that the route needs an authenticated user.
  8.         .To<ArticlesController>(c => c.Create()); // Map the route to the specific action and controller.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement