From 975f286827f1039cca3d7628728878f4dc6b0bc0 Mon Sep 17 00:00:00 2001 From: mnhock Date: Thu, 13 Jun 2024 18:02:00 +0200 Subject: [PATCH] User assertSame for testing --- src/test/java/com/enofex/taikai/TaikaiRuleTest.java | 3 ++- .../com/enofex/taikai/configures/ConfigurerContextTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/enofex/taikai/TaikaiRuleTest.java b/src/test/java/com/enofex/taikai/TaikaiRuleTest.java index 0a6f701..174d277 100644 --- a/src/test/java/com/enofex/taikai/TaikaiRuleTest.java +++ b/src/test/java/com/enofex/taikai/TaikaiRuleTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; @@ -31,7 +32,7 @@ void shouldConstructWithArchRuleAndGivenConfiguration() { assertNotNull(taikaiRule); assertEquals(archRule, taikaiRule.archRule()); - assertEquals(configuration, taikaiRule.configuration()); + assertSame(configuration, taikaiRule.configuration()); } @Test diff --git a/src/test/java/com/enofex/taikai/configures/ConfigurerContextTest.java b/src/test/java/com/enofex/taikai/configures/ConfigurerContextTest.java index 6b09ac1..b322e27 100644 --- a/src/test/java/com/enofex/taikai/configures/ConfigurerContextTest.java +++ b/src/test/java/com/enofex/taikai/configures/ConfigurerContextTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; import org.junit.jupiter.api.Test; @@ -21,7 +22,7 @@ void shouldReturnNamespace() { void shouldReturnConfigurers() { ConfigurerContext context = new ConfigurerContext(VALID_NAMESPACE, VALID_CONFIGURERS); - assertEquals(VALID_CONFIGURERS, context.configurers()); + assertSame(VALID_CONFIGURERS, context.configurers()); } @Test