81f9dda707622556042ea0c6c958371248ace956
[taxeditor.git] / eu.etaxonomy.taxeditor.test / src / test / java / eu / etaxonomy / taxeditor / httpinvoker / CdmServerTest.java
1 // $Id$
2 /**
3 * Copyright (C) 2014 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.taxeditor.httpinvoker;
11
12 import java.net.URL;
13
14 import org.apache.log4j.Logger;
15 import org.eclipse.core.runtime.Platform;
16 import org.junit.Assert;
17 import org.junit.Ignore;
18 import org.junit.Test;
19 import org.osgi.framework.Bundle;
20 import org.unitils.UnitilsJUnit4;
21
22 import eu.etaxonomy.taxeditor.remoting.server.CDMServerException;
23
24 /**
25 * @author cmathew
26 * @date 6 Oct 2014
27 *
28 */
29 public class CdmServerTest extends UnitilsJUnit4 {
30 private static final Logger logger = Logger.getLogger(CdmServerTest.class);
31
32 @Ignore // this should be targetting integration or production
33 @Test
34 public void startCdmServer() throws CDMServerException {
35 Bundle bundle = Platform.getBundle("eu.etaxonomy.taxeditor.test");
36 URL serverPropertiesURL = bundle.getEntry("src/test/resources/server.properties");
37 CDMServer cdmServer = new CDMServer("cdmTest", serverPropertiesURL);
38 cdmServer .start();
39 try {
40 cdmServer.stop(true);
41 } catch (Exception e) {
42 e.printStackTrace();
43 Assert.fail("Server could not be stopped. Reason : " + e.getMessage());
44 }
45 }
46
47 }