From f9b7c8a721afd43ba2736a3ae6ce4e7533af7144 Mon Sep 17 00:00:00 2001
From: Hallvard Traetteberg <hal@ntnu.no>
Date: Wed, 11 Sep 2019 00:52:57 +0200
Subject: [PATCH] Refaktorering

---
 .../restapi/{LatLongService.java => LatLongsService.java}   | 6 +++---
 .../src/main/java/simpleex/restserver/LatLongConfig.java    | 4 ++--
 .../test/java/simpleex/restserver/LatLongsServiceTest.java  | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
 rename simpleexample2/restapi/src/main/java/simpleex/restapi/{LatLongService.java => LatLongsService.java} (92%)

diff --git a/simpleexample2/restapi/src/main/java/simpleex/restapi/LatLongService.java b/simpleexample2/restapi/src/main/java/simpleex/restapi/LatLongsService.java
similarity index 92%
rename from simpleexample2/restapi/src/main/java/simpleex/restapi/LatLongService.java
rename to simpleexample2/restapi/src/main/java/simpleex/restapi/LatLongsService.java
index b76fefa..c3a05ee 100644
--- a/simpleexample2/restapi/src/main/java/simpleex/restapi/LatLongService.java
+++ b/simpleexample2/restapi/src/main/java/simpleex/restapi/LatLongsService.java
@@ -14,10 +14,10 @@ import javax.ws.rs.core.MediaType;
 import simpleex.core.LatLong;
 import simpleex.core.LatLongs;
 
-@Path(LatLongService.LAT_LONG_SERVICE_PATH)
-public class LatLongService {
+@Path(LatLongsService.LAT_LONG_SERVICE_PATH)
+public class LatLongsService {
 
-  public static final String LAT_LONG_SERVICE_PATH = "latLong";
+  public static final String LAT_LONG_SERVICE_PATH = "latLongs";
 
   @Inject
   private LatLongs latLongs;
diff --git a/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongConfig.java b/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongConfig.java
index cb37c13..173d5fc 100644
--- a/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongConfig.java
+++ b/simpleexample2/restserver/src/main/java/simpleex/restserver/LatLongConfig.java
@@ -5,7 +5,7 @@ import org.glassfish.jersey.jackson.JacksonFeature;
 import org.glassfish.jersey.server.ResourceConfig;
 import simpleex.core.LatLongs;
 import simpleex.restapi.LatLongObjectMapperProvider;
-import simpleex.restapi.LatLongService;
+import simpleex.restapi.LatLongsService;
 
 public class LatLongConfig extends ResourceConfig {
 
@@ -17,7 +17,7 @@ public class LatLongConfig extends ResourceConfig {
 
   public LatLongConfig(final LatLongs latLongs) {
     this.latLongs = latLongs;
-    register(LatLongService.class);
+    register(LatLongsService.class);
     register(LatLongObjectMapperProvider.class);
     register(JacksonFeature.class);
 
diff --git a/simpleexample2/restserver/src/test/java/simpleex/restserver/LatLongsServiceTest.java b/simpleexample2/restserver/src/test/java/simpleex/restserver/LatLongsServiceTest.java
index 56b0004..c7b8975 100644
--- a/simpleexample2/restserver/src/test/java/simpleex/restserver/LatLongsServiceTest.java
+++ b/simpleexample2/restserver/src/test/java/simpleex/restserver/LatLongsServiceTest.java
@@ -19,11 +19,11 @@ import org.junit.Before;
 import org.junit.Test;
 import simpleex.core.LatLong;
 import simpleex.restapi.LatLongObjectMapperProvider;
-import simpleex.restapi.LatLongService;
+import simpleex.restapi.LatLongsService;
 
 public class LatLongsServiceTest extends SimpleExJerseyTest {
 
-  private static final String LAT_LONG_SERVICE_PATH = LatLongService.LAT_LONG_SERVICE_PATH;
+  private static final String LAT_LONG_SERVICE_PATH = LatLongsService.LAT_LONG_SERVICE_PATH;
 
   private ObjectMapper objectMapper;
 
-- 
GitLab