use of com.enonic.xp.web.vhost.VirtualHost in project xp by enonic.
the class VirtualHostServiceImplTest method testLoadedConfig_complete.
@Test
public void testLoadedConfig_complete() throws Exception {
final VirtualHostServiceImpl virtualHostService = new VirtualHostServiceImpl(loadConfig("complete"));
assertTrue(virtualHostService.isEnabled());
final List<VirtualHost> mappings = virtualHostService.getVirtualHosts();
assertNotNull(mappings);
assertEquals(4, mappings.size());
assertMapping(mappings.get(0), "b", "enonic.com", "/status/b", "/full/path/status/b", IdProviderKeys.from("enonic"), null);
assertMapping(mappings.get(1), "a", "localhost", "/status/a", "/full/path/status/a", IdProviderKeys.from(IdProviderKey.system()), null);
assertMapping(mappings.get(2), "c", "localhost", "/status/c", "/full/path/status/c", null, null);
assertMapping(mappings.get(3), "d", "localhost", "/status/d", "/full/path/status/d", IdProviderKeys.from("enonic.with.a.dot"), IdProviderKeys.from("enonic_disabled", "notSpecifiedProvider"));
}
use of com.enonic.xp.web.vhost.VirtualHost in project xp by enonic.
the class VirtualHostServiceImplTest method testLoadedConfig_simple.
@Test
public void testLoadedConfig_simple() throws Exception {
final VirtualHostServiceImpl virtualHostService = new VirtualHostServiceImpl(loadConfig("simple"));
assertTrue(virtualHostService.isEnabled());
final List<VirtualHost> mappings = virtualHostService.getVirtualHosts();
assertNotNull(mappings);
assertEquals(1, mappings.size());
assertMapping(mappings.get(0), "a", "localhost", "/status", "/full/path/status", null, null);
}
Aggregations