Skip to content

Commit

Permalink
BC-7234
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored May 22, 2024
1 parent bd25c0d commit 9b08f22
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/test/java/de/svs/doido/mongo/dto/ConfigmapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,57 @@ void testEquals () {
assertEquals( true, d.equals(c));
}

@Test
void testEquals2 () {
Configmap c = new Configmap();
Configmap d = new Configmap();
String uri = "proto://foo.bar.com/";
String name = "hausboot";
String uri2 = "proto://foo.bar.com/";
String name2 = "hausboot2";
c.setName(name);
c.setUri(uri);
d.setName(name2);
d.setUri(uri2);
assertEquals( false, d.equals(c));
}

@Test
void testEqualsEmpty () {
Configmap c = new Configmap();
Configmap d = new Configmap();
assertEquals( true, d.equals(c));
}

@Test
void testEqualsEmptyAndNot () {
Configmap c = new Configmap();
Configmap d = new Configmap();
String uri2 = "proto://foo.bar.com/";
String name2 = "hausboot2";
d.setName(name2);
d.setUri(uri2);
assertEquals( true, d.equals(c));
}

@Test
void testEqualsNoUri () {
Configmap c = new Configmap();
Configmap d = new Configmap();
String name = "hausboot";
c.setUri(name);
d.setUri(name);
assertEquals( true, d.equals(c));
}

@Test
void testEqualsUriNotPass () {
Configmap c = new Configmap();
Configmap d = new Configmap();
String uri = "proto:foo.bar.com/";
c.setUri(uri);
d.setUri(uri);
assertEquals( true, d.equals(c));
}

}

0 comments on commit 9b08f22

Please sign in to comment.