public void Ctor_WithAllNonNullArgs_SetsProperties()
        {
            //arrange
            var requestContext = new RequestContext(new Mock<HttpContextBase>().Object, new RouteData());
            var urlHelper = new UrlHelper(requestContext, new RouteCollection());
            ObjectProvider objectRepository = new Mock<ObjectProvider>().Object;
            var blog = new Blog();

            //act
            var subtextContext = new SubtextContext(blog, requestContext, urlHelper, objectRepository, null, null, null);

            //assert
            Assert.AreEqual(blog, subtextContext.Blog);
            Assert.AreEqual(urlHelper, subtextContext.UrlHelper);
            Assert.AreEqual(requestContext, subtextContext.RequestContext);
            Assert.AreEqual(objectRepository, subtextContext.Repository);
        }
示例#2
0
 public SkinsController(SubtextContext subtextContext)
 {
     SubtextContext = subtextContext;
 }