| /** |
| ****************************************************************************** |
| * Copyright © 2018 PTA GmbH. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| ****************************************************************************** |
| */ |
| |
| package org.eclipse.openK.resources; |
| |
| import org.eclipse.jetty.http.HttpStatus; |
| import org.eclipse.openK.core.controller.ServicesConfigCache; |
| import org.eclipse.openK.core.exceptions.HttpStatusException; |
| import org.junit.Test; |
| |
| import javax.ws.rs.core.Response; |
| |
| import static junit.framework.TestCase.assertNotNull; |
| import static org.junit.Assert.assertEquals; |
| |
| public class MicsCentralResourceTest { |
| @Test |
| public void testGetVersionInfo() { |
| Response r = new MicsCentralResource().getVersionInfo(); |
| assertNotNull( r ); |
| } |
| |
| @Test |
| public void testGetServiceDistribution() throws HttpStatusException { |
| ServicesConfigCache.getInstance().readServerDistribution("servicesDistributionDevLocal.json"); |
| Response r = new MicsCentralResource().getServiceDistribution("elogbook.openK" ); |
| |
| assertEquals(HttpStatus.OK_200, r.getStatus()); |
| } |
| } |