Drop the use of google truth/@LogRule 57/87057/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 20 Jan 2020 19:00:16 +0000 (20:00 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 20 Jan 2020 19:08:36 +0000 (20:08 +0100)
Simple JUnit is sufficient here, no need to depend on Truth
nor infrautils-testutils here.

Change-Id: I306799d4adc1f98fe7ffe8477c25fb231d9bd0a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb-bierman02/pom.xml
restconf/restconf-nb-bierman02/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/Bierman02RestConfWiringTest.java
restconf/restconf-nb-rfc8040/pom.xml
restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/test/Rfc8040RestConfWiringTest.java

index 92eb369435e8f39cfbad988d0808d8ad299502ff..666a1f462d90896b5f5096b941acc766e75d7d81 100644 (file)
       <artifactId>inject.guice.testutils</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.infrautils</groupId>
-      <artifactId>infrautils-testutils</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <build>
index 8853ff635c79daacc0f2237c628e24e2754557fd..990453fa9f728c12bba995e895e8dcb068108d45 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.sal.restconf.impl.test;
 
-import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertEquals;
 
 import com.google.inject.AbstractModule;
 import java.io.IOException;
@@ -22,7 +22,6 @@ import org.opendaylight.aaa.web.testutils.WebTestModule;
 import org.opendaylight.controller.sal.restconf.impl.test.incubate.InMemoryMdsalModule;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
 import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
-import org.opendaylight.infrautils.testutils.LogRule;
 import org.opendaylight.netconf.sal.restconf.api.RestConfConfig;
 import org.opendaylight.netconf.sal.restconf.impl.Bierman02RestConfWiring;
 
@@ -42,8 +41,6 @@ public class Bierman02RestConfWiringTest {
         }
     }
 
-    public @Rule LogRule logRule = new LogRule();
-
     public @Rule GuiceRule guice = new GuiceRule(TestModule.class,
             InMemoryMdsalModule.class, WebTestModule.class, AnnotationsModule.class);
 
@@ -52,6 +49,6 @@ public class Bierman02RestConfWiringTest {
 
     @Test
     public void testWiring() throws IOException, InterruptedException, URISyntaxException {
-        assertThat(webClient.request("GET", "/restconf/modules/").statusCode()).isEqualTo(200);
+        assertEquals(200, webClient.request("GET", "/restconf/modules/").statusCode());
     }
 }
index ecc7fd617d725283a344f60f3233c8b649d66e7d..e7c5feebd5cdc735e00ef1a9b11b565eff1166f1 100644 (file)
       <artifactId>inject.guice.testutils</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.infrautils</groupId>
-      <artifactId>infrautils-testutils</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.opendaylight.netconf</groupId>
       <artifactId>ietf-restconf</artifactId>
index addc750a316af8edcd649634ccdf4316d238c3d9..da40353684c2673f4927541efd9dc4ddc9aee476 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.restconf.nb.rfc8040.test;
 
-import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertEquals;
 
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.google.inject.AbstractModule;
@@ -26,7 +26,6 @@ import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
 import org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper;
 import org.opendaylight.infrautils.inject.guice.testutils.AnnotationsModule;
 import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
-import org.opendaylight.infrautils.testutils.LogRule;
 import org.opendaylight.restconf.nb.rfc8040.RestconfApplication;
 import org.opendaylight.restconf.nb.rfc8040.Rfc8040RestConfWiring;
 import org.opendaylight.restconf.nb.rfc8040.handlers.SchemaContextHandler;
@@ -70,8 +69,6 @@ public class Rfc8040RestConfWiringTest {
         }
     }
 
-    public @Rule LogRule logRule = new LogRule();
-
     public @Rule GuiceRule guice = new GuiceRule(TestModule.class,
             InMemoryMdsalModule.class, WebTestModule.class, AnnotationsModule.class);
 
@@ -84,6 +81,6 @@ public class Rfc8040RestConfWiringTest {
     @Test
     public void testWiring() throws IOException, InterruptedException, URISyntaxException {
         schemaContextHandler.onGlobalContextUpdated(schemaContextProvider.getSchemaContext());
-        assertThat(webClient.request("GET", "/rests/yang-library-version").statusCode()).isEqualTo(200);
+        assertEquals(200, webClient.request("GET", "/rests/yang-library-version").statusCode());
     }
 }