Ditch Truth from IdmLightConfigTest 78/100878/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Apr 2022 18:16:04 +0000 (20:16 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Apr 2022 18:16:04 +0000 (20:16 +0200)
The use case here is a verbose alternative to assertEquals(), just ditch
Truth.

Change-Id: I9391e5bb6611a1986d9991b1d51e3f4ea3fbf956
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
aaa-idm-store-h2/pom.xml
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/IdmLightConfigTest.java

index 6dd9de1b3c451a0102d592cf2c573861f8809673..42c840a6c691774b1f945fdd3e6de073ab999c3e 100644 (file)
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
         </dependency>
-
-        <!-- Test dependencies -->
-        <dependency>
-            <groupId>com.google.truth</groupId>
-            <artifactId>truth</artifactId>
-        </dependency>
     </dependencies>
 </project>
index 9ae8aa332b9e3c263cd73e6808187943b68d5a0e..6aa26d3922dcc4aa8f04bf5126955fdacc69abd3 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.aaa.datastore.h2;
 
-import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 
@@ -17,15 +17,14 @@ import org.junit.Test;
  * @author Michael Vorburger
  */
 public class IdmLightConfigTest {
-
     @Test
     public void testDefaults() {
         IdmLightConfig config = new IdmLightConfigBuilder().dbUser("foo").dbPwd("bar").build();
-        assertThat(config.getDbDriver()).isEqualTo("org.h2.Driver");
-        assertThat(config.getDbConnectionString()).isEqualTo("jdbc:h2:./data/idmlight.db");
-        assertThat(config.getDbUser()).isEqualTo("foo");
-        assertThat(config.getDbPwd()).isEqualTo("bar");
-        assertThat(config.getDbValidTimeOut()).isEqualTo(3);
+        assertEquals("org.h2.Driver", config.getDbDriver());
+        assertEquals("jdbc:h2:./data/idmlight.db", config.getDbConnectionString());
+        assertEquals("foo", config.getDbUser());
+        assertEquals("bar", config.getDbPwd());
+        assertEquals(3, config.getDbValidTimeOut());
     }
 
     @Test
@@ -34,7 +33,7 @@ public class IdmLightConfigTest {
         builder.dbUser("foo").dbPwd("bar");
         builder.dbDirectory("target");
         IdmLightConfig config = builder.build();
-        assertThat(config.getDbConnectionString()).isEqualTo("jdbc:h2:target/idmlight.db");
+        assertEquals("jdbc:h2:target/idmlight.db", config.getDbConnectionString());
     }
 
     @Test
@@ -43,7 +42,6 @@ public class IdmLightConfigTest {
         builder.dbUser("foo").dbPwd("bar");
         builder.dbConnectionString("jdbc:mysql://localhost/test");
         IdmLightConfig config = builder.build();
-        assertThat(config.getDbConnectionString()).isEqualTo("jdbc:mysql://localhost/test");
+        assertEquals("jdbc:mysql://localhost/test", config.getDbConnectionString());
     }
-
 }