Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void setUp() {
integer1.setOriginalValue(2);
integer2 = new ModifiableInteger();
integer2.setOriginalValue(2);
nullInteger = new ModifiableInteger();
this.nullInteger = new ModifiableInteger();
}

/** Test of default constructor, of class ModifiableInteger. */
Expand Down Expand Up @@ -76,7 +76,7 @@ void testCreateCopy() {
void testGetAssertEquals() {
integer1.setAssertEquals(2);
assertEquals(2, integer1.getAssertEquals());
assertNull(nullInteger.getAssertEquals());
assertNull(this.nullInteger.getAssertEquals());
}

/** Test of setAssertEquals method, of class ModifiableInteger. */
Expand Down Expand Up @@ -109,7 +109,7 @@ void testGetByteArray() {
void testValidateAssertions() {
// No assertions set - should be valid
assertTrue(integer1.validateAssertions());
assertTrue(nullInteger.validateAssertions());
assertTrue(this.nullInteger.validateAssertions());

// Set matching assertion
integer1.setAssertEquals(2);
Expand Down Expand Up @@ -148,7 +148,7 @@ void testIsOriginalValueModified() {
org.junit.jupiter.api.Assertions.assertThrows(
IllegalStateException.class,
() -> {
nullInteger.isOriginalValueModified();
this.nullInteger.isOriginalValueModified();
});

ModifiableInteger nullIntWithExplicit = new ModifiableInteger((Integer) null);
Expand All @@ -165,7 +165,7 @@ void testIsOriginalValueModified() {
@Test
void testGetOriginalValue() {
assertEquals(2, integer1.getOriginalValue());
assertNull(nullInteger.getOriginalValue());
assertNull(this.nullInteger.getOriginalValue());
}

/** Test of setOriginalValue method, of class ModifiableInteger. */
Expand All @@ -188,7 +188,7 @@ void testToString() {
integer1.setOriginalValue(4);
assertNotEquals(integer1.toString(), integer2.toString());

String nullString = nullInteger.toString();
String nullString = this.nullInteger.toString();
assertTrue(nullString.contains("originalValue=null"));

// Test with modification
Expand Down Expand Up @@ -250,7 +250,7 @@ void testHashCode() {
assertEquals(hash1, hash2);

// Test with null value
int nullHash = nullInteger.hashCode();
int nullHash = this.nullInteger.hashCode();
assertEquals(527, nullHash); // Expected value: 17 * 31 + 0 = 527
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void testHashCode() {
// Test with null value
ModifiableByte nullByte = new ModifiableByte();
// The actual hashCode implementation varies by JVM and implementation
int nullByteHash = nullByte.hashCode();
nullByte.hashCode();
}

/** Test of copy constructor and createCopy method. */
Expand Down