示例#1
0
        public void AdminController_Request_IfRequestMockIsSetReturnsThat()
        {
            var controller = new StubMrCMSAdminController();

            var httpRequestBase = A.Fake<HttpRequestBase>();
            controller.RequestMock = httpRequestBase;

            controller.Request.Should().Be(httpRequestBase);
        }
示例#2
0
        public void AdminController_Json_ObjectStringEncodingReturnsJsonNetResult()
        {
            var controller = new StubMrCMSAdminController();

            var        data       = new object();
            JsonResult jsonResult = controller.Json(data, "test/content-type", Encoding.ASCII);

            jsonResult.Should().BeOfType <JsonNetResult>();
        }
示例#3
0
        public void AdminController_Json_ObjectStringEncodingReturnsJsonNetResult()
        {
            var controller = new StubMrCMSAdminController();

            var data = new object();
            JsonResult jsonResult = controller.Json(data, "test/content-type", Encoding.ASCII);

            jsonResult.Should().BeOfType<JsonNetResult>();
        }
示例#4
0
        public void AdminController_Request_IfRequestMockIsSetReturnsThat()
        {
            var controller = new StubMrCMSAdminController();

            var httpRequestBase = A.Fake <HttpRequestBase>();

            controller.RequestMock = httpRequestBase;

            controller.Request.Should().Be(httpRequestBase);
        }