replace all fixed wiremock ports
[so.git] / adapters / mso-sdnc-adapter / src / test / java / org / onap / so / adapters / sdnc / BaseTest.java
index 9716bb6..2992193 100644 (file)
@@ -24,6 +24,7 @@ import org.junit.After;
 import org.junit.Rule;
 import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.web.client.TestRestTemplate;
@@ -31,6 +32,8 @@ import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
 import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
+import com.github.tomakehurst.wiremock.WireMockServer;
+
 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = SDNCAdapterApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @ActiveProfiles("test")
@@ -38,7 +41,10 @@ import org.springframework.test.context.junit4.SpringRunner;
 public abstract class BaseTest {
     @Rule
     public ExpectedException expectedException = ExpectedException.none();
-
+    
+    @Autowired
+    protected WireMockServer wireMockServer;
+    
     protected TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
 
     @Value("${wiremock.server.port}")