Javadoc, in-line comment, and messages typos

This commit is contained in:
Gary Gregory 2023-05-19 08:59:46 -04:00
parent 9e404e5eb8
commit ad710950a2
1 changed files with 7 additions and 7 deletions

View File

@ -287,7 +287,7 @@ public class ExtendedMessageFormatTest extends AbstractLangTest {
} }
/** /**
* Test equals() and hashcode. * Test equals() and hashCode().
*/ */
@Test @Test
public void testEqualsHashcode() { public void testEqualsHashcode() {
@ -301,32 +301,32 @@ public class ExtendedMessageFormatTest extends AbstractLangTest {
// Same object // Same object
assertEquals(emf, emf, "same, equals()"); assertEquals(emf, emf, "same, equals()");
assertEquals(emf.hashCode(), emf.hashCode(), "same, hashcode()"); assertEquals(emf.hashCode(), emf.hashCode(), "same, hashCode()");
// Equal Object // Equal Object
other = new ExtendedMessageFormat(pattern, Locale.US, fmtRegistry); other = new ExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
assertEquals(emf, other, "equal, equals()"); assertEquals(emf, other, "equal, equals()");
assertEquals(emf.hashCode(), other.hashCode(), "equal, hashcode()"); assertEquals(emf.hashCode(), other.hashCode(), "equal, hashCode()");
// Different Class // Different Class
other = new OtherExtendedMessageFormat(pattern, Locale.US, fmtRegistry); other = new OtherExtendedMessageFormat(pattern, Locale.US, fmtRegistry);
assertNotEquals(emf, other, "class, equals()"); assertNotEquals(emf, other, "class, equals()");
assertEquals(emf.hashCode(), other.hashCode(), "class, hashcode()"); // same hashcode assertEquals(emf.hashCode(), other.hashCode(), "class, hashCode()"); // same hash code
// Different pattern // Different pattern
other = new ExtendedMessageFormat("X" + pattern, Locale.US, fmtRegistry); other = new ExtendedMessageFormat("X" + pattern, Locale.US, fmtRegistry);
assertNotEquals(emf, other, "pattern, equals()"); assertNotEquals(emf, other, "pattern, equals()");
assertNotEquals(emf.hashCode(), other.hashCode(), "pattern, hashcode()"); assertNotEquals(emf.hashCode(), other.hashCode(), "pattern, hashCode()");
// Different registry // Different registry
other = new ExtendedMessageFormat(pattern, Locale.US, otherRegistry); other = new ExtendedMessageFormat(pattern, Locale.US, otherRegistry);
assertNotEquals(emf, other, "registry, equals()"); assertNotEquals(emf, other, "registry, equals()");
assertNotEquals(emf.hashCode(), other.hashCode(), "registry, hashcode()"); assertNotEquals(emf.hashCode(), other.hashCode(), "registry, hashCode()");
// Different Locale // Different Locale
other = new ExtendedMessageFormat(pattern, Locale.FRANCE, fmtRegistry); other = new ExtendedMessageFormat(pattern, Locale.FRANCE, fmtRegistry);
assertNotEquals(emf, other, "locale, equals()"); assertNotEquals(emf, other, "locale, equals()");
assertEquals(emf.hashCode(), other.hashCode(), "locale, hashcode()"); // same hashcode assertEquals(emf.hashCode(), other.hashCode(), "locale, hashCode()"); // same hash code
} }
/** /**