public void TestInit()
        {
            var typeUser = typeof(UsersController);
            tran = new TransactionScope();

            var routes = new List<Route>
            {
                //api/posts/{postId}/comment
                new Route(
                    "CustomPostsApi",
                    "api/posts/{postId}/comment",
                    new 
                    {
                        controller = "posts",
                        action = "comment"
                    }),
                new Route(

                    "DefaultPostsApi",
                    "api/posts",
                    new 
                    {
                        controller = "posts"
                    }),
                    new Route(
                    "DefaultUsersApi",
                    "api/users/{action}",
                    new 
                    {
                        controller = "users"
                    })
            };

            this.httpServer = new InMemoryHttpServer("http://localhost/", routes);
        }
        public void TestInit()
        {
            var typeUser = typeof(UsersController);
            tran = new TransactionScope();

            var routes = new List<Route>
            {
                new Route(
                    "DefaultUsersApi",
                    "api/users/{action}",
                    new 
                    {
                        controller = "users"
                    })
            };

            this.httpServer = new InMemoryHttpServer("http://localhost/", routes);
        }
 private UserLogedDto RegisterTestUser(InMemoryHttpServer httpServer, UserDto testUser)
 {
     var response = httpServer.Post("api/users/register", testUser);
     var contentString = response.Content.ReadAsStringAsync().Result;
     var userModel = JsonConvert.DeserializeObject<UserLogedDto>(contentString);
     return userModel;
 }