Search in sources :

Example 1 with ValidatorStringResourceLoader

use of org.apache.wicket.resource.loader.ValidatorStringResourceLoader in project wicket by apache.

the class ApplicationSettingsTest method testDefaultStringResourceLoaderSetup.

/**
 */
@Test
public void testDefaultStringResourceLoaderSetup() {
    ResourceSettings settings = new ResourceSettings(new MockApplication());
    List<IStringResourceLoader> loaders = settings.getStringResourceLoaders();
    Assert.assertEquals("There should be 5 default loaders", 5, loaders.size());
    Assert.assertTrue("First loader one should be the component one", loaders.get(0) instanceof ComponentStringResourceLoader);
    Assert.assertTrue("Second loader should be the package one", loaders.get(1) instanceof PackageStringResourceLoader);
    Assert.assertTrue("Third loader should be the application one", loaders.get(2) instanceof ClassStringResourceLoader);
    Assert.assertTrue("Fourth loader should be the validator one", loaders.get(3) instanceof ValidatorStringResourceLoader);
    Assert.assertTrue("Fifth should be the initializer one", loaders.get(4) instanceof InitializerStringResourceLoader);
}
Also used : PackageStringResourceLoader(org.apache.wicket.resource.loader.PackageStringResourceLoader) ComponentStringResourceLoader(org.apache.wicket.resource.loader.ComponentStringResourceLoader) MockApplication(org.apache.wicket.mock.MockApplication) ResourceSettings(org.apache.wicket.settings.ResourceSettings) InitializerStringResourceLoader(org.apache.wicket.resource.loader.InitializerStringResourceLoader) IStringResourceLoader(org.apache.wicket.resource.loader.IStringResourceLoader) ValidatorStringResourceLoader(org.apache.wicket.resource.loader.ValidatorStringResourceLoader) ClassStringResourceLoader(org.apache.wicket.resource.loader.ClassStringResourceLoader) Test(org.junit.Test)

Aggregations

MockApplication (org.apache.wicket.mock.MockApplication)1 ClassStringResourceLoader (org.apache.wicket.resource.loader.ClassStringResourceLoader)1 ComponentStringResourceLoader (org.apache.wicket.resource.loader.ComponentStringResourceLoader)1 IStringResourceLoader (org.apache.wicket.resource.loader.IStringResourceLoader)1 InitializerStringResourceLoader (org.apache.wicket.resource.loader.InitializerStringResourceLoader)1 PackageStringResourceLoader (org.apache.wicket.resource.loader.PackageStringResourceLoader)1 ValidatorStringResourceLoader (org.apache.wicket.resource.loader.ValidatorStringResourceLoader)1 ResourceSettings (org.apache.wicket.settings.ResourceSettings)1 Test (org.junit.Test)1