Skip to content

Commit

Permalink
ARTEMIS-3363: add a couple of assertions for completeness (+fix depre…
Browse files Browse the repository at this point in the history
…cation warning)

(cherry picked from commit ea8fe11)
  • Loading branch information
gemmellr authored and clebertsuconic committed Jan 24, 2022
1 parent 1b6ce30 commit 9863fed
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;

public class TransportConfigurationTest {

Expand Down Expand Up @@ -82,7 +83,9 @@ public void testExtraParamsEquals() {

Assert.assertNotEquals(new TransportConfiguration(className, params, name, null), new TransportConfiguration(className, params, name, extraParams));
Assert.assertNotEquals(new TransportConfiguration(className, params, name, Collections.emptyMap()), new TransportConfiguration(className, params, name, extraParams));
Assert.assertNotEquals(new TransportConfiguration(className, params, name, extraParams), new TransportConfiguration(className, params, name, Collections.singletonMap("key", "too")));
Assert.assertNotEquals(new TransportConfiguration(className, params, name, extraParams), new TransportConfiguration(className, params, name, Collections.singletonMap("key", "other")));
Assert.assertNotEquals(new TransportConfiguration(className, params, name, extraParams), new TransportConfiguration(className, params, name, null));
Assert.assertNotEquals(new TransportConfiguration(className, params, name, extraParams), new TransportConfiguration(className, params, name, Collections.emptyMap()));
}

@Test
Expand All @@ -93,7 +96,7 @@ public void testToStringObfuscatesPasswords() {

TransportConfiguration configuration = new TransportConfiguration("SomeClass", params, null);

Assert.assertThat(configuration.toString(), not(containsString("secret_password")));
assertThat(configuration.toString(), not(containsString("secret_password")));
}

@Test
Expand Down

0 comments on commit 9863fed

Please sign in to comment.