public void ComplexVPath_ProcessLocationForControllerDefaultName_OutputsCorrectPaths()
        {
            var req = new ViewRequest()
            {
                ViewFolder = "home", DefaultName = "index"
            };

            serviceWithComplexVPath.ProcessLocations(req, new StubHttpContext());
            req.ViewLocations.Count().Should().Be(2);
            req.ViewLocations.ElementAt(0).Should().Be("/0.0.0/Service/Views/home/index");
            req.ViewLocations.ElementAt(1).Should().Be("/0.0.0/Service/Views/Shared/index");
        }
예제 #2
0
        public void DefaultVPath_ProcessLocationForControllerDefaultName_OutputsCorrectPaths()
        {
            var req = new ViewRequest()
            {
                ViewFolder = "home", DefaultName = "index"
            };

            serviceNoVPath.ProcessLocations(req, new StubHttpContext());
            req.ViewLocations.Count().Should().Be(4);
            req.ViewLocations.ElementAt(0).Should().Be("/bundles/BundleName/Views/home/index");
            req.ViewLocations.ElementAt(1).Should().Be("/Views/home/index");
            req.ViewLocations.ElementAt(2).Should().Be("/bundles/BundleName/Views/Shared/index");
            req.ViewLocations.ElementAt(3).Should().Be("/Views/Shared/index");
        }