コード例 #1
0
        public void ResourceManager_SimpleTest()
        {
            var configuration = RedwoodConfiguration.CreateDefault();
            var manager = new ResourceManager(configuration);

            manager.AddRequiredResource(Constants.JQueryResourceName);
            Assert.AreEqual(configuration.Resources.FindResource(Constants.JQueryResourceName), manager.GetResourcesInOrder().First());
        }
コード例 #2
0
        public void ResourceManager_DependentResources_Css()
        {
            var configuration = RedwoodConfiguration.CreateDefault();
            var manager = new ResourceManager(configuration);

            manager.AddRequiredResource(Constants.BootstrapResourceName);
            var resourcesInCorrectOrder = manager.GetResourcesInOrder().ToList();
            Assert.AreEqual(configuration.Resources.FindResource(Constants.BootstrapCssResourceName), resourcesInCorrectOrder[0]);
            Assert.AreEqual(configuration.Resources.FindResource(Constants.JQueryResourceName), resourcesInCorrectOrder[1]);
            Assert.AreEqual(configuration.Resources.FindResource(Constants.BootstrapResourceName), resourcesInCorrectOrder[2]);
        }
コード例 #3
0
        public void ResourceManager_DependentResources()
        {
            var configuration = RedwoodConfiguration.CreateDefault();
            var manager = new ResourceManager(configuration);

            manager.AddRequiredResource(Constants.RedwoodResourceName);
            var resourcesInCorrectOrder = manager.GetResourcesInOrder().ToList();
            Assert.AreEqual(configuration.Resources.FindResource(Constants.KnockoutJSResourceName), resourcesInCorrectOrder[0]);
            Assert.AreEqual(configuration.Resources.FindResource(Constants.KnockoutMapperResourceName), resourcesInCorrectOrder[1]);
            Assert.AreEqual(configuration.Resources.FindResource(Constants.RedwoodResourceName), resourcesInCorrectOrder[2]);
        }