示例#1
0
        public void ConstructForNonPartial(ControllerContext controllerContext, string viewName, bool useCache)
        {
            var sut = new ViewEngine.FindViews.Arguments(false, controllerContext, viewName, "MasterName", useCache);

            Assert.Equal(controllerContext, sut.ControllerContext);
            Assert.Equal(viewName, sut.ViewName);
            Assert.Equal(useCache, sut.UseCache);
            Assert.Equal("MasterName", sut.MasterName);
        }
示例#2
0
        public void ConstructForPartial(ControllerContext controllerContext, string viewName, bool useCache)
        {
            var sut = new ViewEngine.FindViews.Arguments(true, controllerContext, viewName, useCache, false); // last false is a lie to prove the test

            Assert.Equal(controllerContext, sut.ControllerContext);
            Assert.Equal(viewName, sut.ViewName);
            Assert.Equal(useCache, sut.UseCache);
            Assert.Equal(string.Empty, sut.MasterName);
        }