Examples of CoreConfiguration


Examples of com.findwise.hydra.CoreConfiguration

 
  private static RESTServer server;

  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    CoreConfiguration conf = ConfigurationFactory.getConfiguration(TEST_NAME);
    new MongoClient(new MongoClientURI(conf.getDatabaseUrl())).getDB(TEST_NAME).dropDatabase();
    dbc = new MongoConnector(conf);
   
    ShutdownHandler shutdownHandler = Mockito.mock(ShutdownHandler.class);
   
    Mockito.when(shutdownHandler.isShuttingDown()).thenReturn(false);
View Full Code Here

Examples of com.findwise.hydra.CoreConfiguration

    dbc.getDocumentWriter().deleteAll();
  }
 
  @AfterClass
  public static void tearDownClass() throws Exception {
    CoreConfiguration conf = ConfigurationFactory.getConfiguration(TEST_NAME);
    new MongoClient(new MongoClientURI(conf.getDatabaseUrl())).getDB(TEST_NAME).dropDatabase();
  }
View Full Code Here

Examples of com.findwise.hydra.CoreConfiguration

public class RESTServerTest {

  @Test
  public void testBlockingStart() throws IOException, InterruptedException {
    CoreConfiguration conf = ConfigurationFactory.getConfiguration("jUnit-RESTServerTest");
    MongoConnector dbc = new MongoConnector(conf);
    int port = conf.getRestPort();
    RESTServer server1 = new RESTServer(conf, new HttpRESTHandler<MongoType>(dbc));
   
    if(!server1.blockingStart()) {
      server1 = RESTServer.getNewStartedRESTServer(port, new HttpRESTHandler<MongoType>(dbc));
    }
View Full Code Here

Examples of com.findwise.hydra.CoreConfiguration

    server2.shutdown();
  }

  @Test
  public void testShutdown() throws IOException, InterruptedException {
    CoreConfiguration conf = ConfigurationFactory.getConfiguration("jUnit-RESTServerTest");
    RESTServer server = RESTServer.getNewStartedRESTServer(conf.getRestPort(), new HttpRESTHandler<MongoType>(new MongoConnector(conf)));
    server.shutdown();
    Thread.sleep(1000);
    if(server.isAlive()) {
      fail("Thread should be dead");
    }
View Full Code Here

Examples of org.castor.core.CoreConfiguration

* UTF test case for {@see org.castor.jdo.drivers.PointbaseFactory}.
*/
public class TestMappingLoaderRegistry extends TestCase {

    public final void testGetInstance() throws Exception {
        Configuration config = new CoreConfiguration();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(config);
        assertNotNull(registry);
    }
View Full Code Here

Examples of org.castor.core.CoreConfiguration

        MappingLoaderRegistry registry = new MappingLoaderRegistry(config);
        assertNotNull(registry);
    }

    public final void testEnlistMappingLoaders() throws Exception {
        Configuration config = new CoreConfiguration();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(config);
        assertNotNull(registry);

        Collection factories = registry.getMappingLoaderFactories();
        assertNotNull(factories);
View Full Code Here

Examples of org.castor.core.CoreConfiguration

        assertEquals("CastorXmlMapping", factory.getSourceType());

    }

    public final void testGetXMLMappingLoader() throws Exception {
        Configuration config = new CoreConfiguration();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(config);
        assertNotNull(registry);

        MappingLoader mappingLoader = registry.getMappingLoader(
                "CastorXmlMapping", BindingType.XML);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.