Skip to content

Commit

Permalink
BC-7234 - fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored May 23, 2024
1 parent fb22488 commit d6ff8fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@
<artifactId>commons-validator</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.16.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
18 changes: 12 additions & 6 deletions src/test/java/de/svs/doido/mongo/dto/ConfigmapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ void testHashcode() {
}

@Test
void testHashcodeSubClass() {
void testHashcodeSubClass () {
String uri = "proto://foo.bar.com/";
String name = "hausboot";
assertEquals(c.hashCode(), c.hashCode());
assertNotEquals(sub.hashCode(), c.hashCode());
assertEquals(sub.hashCode(), c.hashCode());
c.setName(name);
assertNotEquals(sub.hashCode(), c.hashCode());
c.setUri(uri);
Expand Down Expand Up @@ -128,12 +127,19 @@ void testEqualsName () {
c.setName(name);
assertEquals( false, d.equals(c));
assertEquals( false, c.equals(d));
assertEquals( false, sub.equals(c));
assertEquals( false, c.equals(sub));
d.setName(name);
sub.setName(name);
assertEquals( true, d.equals(c));
assertEquals( true, c.equals(d));
}

@Test
void testEqualsSubName () {
String uri = "proto://foo.bar.com/";
String name = "hausboot";
c.setName(name);
assertEquals( false, sub.equals(c));
assertEquals( false, c.equals(sub));
sub.setName(name);
assertEquals( true, sub.equals(c));
assertEquals( true, c.equals(sub));
}
Expand Down

0 comments on commit d6ff8fe

Please sign in to comment.