public void ResourceManager_SimpleTest() { var configuration = DotvvmConfiguration.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 = DotvvmConfiguration.CreateDefault(); var manager = new ResourceManager(configuration); manager.AddRequiredResource(ResourceConstants.DotvvmFileUploadCssResourceName); var resourcesInCorrectOrder = manager.GetResourcesInOrder().ToList(); Assert.AreEqual(configuration.Resources.FindResource(ResourceConstants.DotvvmFileUploadCssResourceName), resourcesInCorrectOrder[0]); }
public void ResourceManager_DependentResources() { var configuration = DotvvmConfiguration.CreateDefault(); var manager = new ResourceManager(configuration); manager.AddRequiredResource(Constants.DotvvmResourceName); 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.DotvvmResourceName), resourcesInCorrectOrder[2]); }