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()); }
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]); }
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]); }