Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestControllerBuilder"/> class.
 /// </summary>
 public TestControllerBuilder()
 {
     AppRelativeCurrentExecutionFilePath = "~/";
     ApplicationPath = "/";
     PathInfo        = "";
     RouteData       = new RouteData();
     _mocks          = new MockRepository();
     Session         = new MockSession();
     SetupHttpContext();
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestControllerBuilder"/> class using
        /// the specified mock factory to create any mock objects.
        /// </summary>
        public TestControllerBuilder(IMockFactory mockFactory)
        {
            AppRelativeCurrentExecutionFilePath = "~/";
            ApplicationPath = "/";
            PathInfo        = "";

            RouteData          = new RouteData();
            Session            = new MockSession();
            TempDataDictionary = new TempDataDictionary();
            QueryString        = new NameValueCollection();
            Form  = new NameValueCollection();
            Files = new WriteableHttpFileCollection();

            Setup(mockFactory);
        }