Skip to content

Commit 15b2f2b

Browse files
committed
refactor test method names in MaximumSumOfNonAdjacentElementsTest to follow Checkstyle naming conventions
1 parent d64e300 commit 15b2f2b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/test/java/com/thealgorithms/dynamicprogramming/MaximumSumOfNonAdjacentElementsTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,44 @@ public class MaximumSumOfNonAdjacentElementsTest {
88

99
// Tests for Approach1
1010
@Test
11-
public void testGetMaxSumApproach1_WithEmptyArray() {
11+
public void testGetMaxSumApproach1WithEmptyArray() {
1212
assertEquals(0, MaximumSumOfNonAdjacentElements.getMaxSumApproach1(new int[] {})); // Empty array
1313
}
1414

1515
@Test
16-
public void testGetMaxSumApproach1_WithSingleElement() {
16+
public void testGetMaxSumApproach1WithSingleElement() {
1717
assertEquals(1, MaximumSumOfNonAdjacentElements.getMaxSumApproach1(new int[] {1})); // Single element
1818
}
1919

2020
@Test
21-
public void testGetMaxSumApproach1_WithTwoElements_TakeMax() {
21+
public void testGetMaxSumApproach1WithTwoElementsTakeMax() {
2222
assertEquals(2, MaximumSumOfNonAdjacentElements.getMaxSumApproach1(new int[] {1, 2})); // Take max of both
2323
}
2424

2525
@Test
26-
public void testGetMaxSumApproach1_WithMultipleElements() {
26+
public void testGetMaxSumApproach1WithMultipleElements() {
2727
assertEquals(15, MaximumSumOfNonAdjacentElements.getMaxSumApproach1(new int[] {3, 2, 5, 10, 7})); // 3 + 7 + 5
2828
assertEquals(10, MaximumSumOfNonAdjacentElements.getMaxSumApproach1(new int[] {5, 1, 1, 5})); // 5 + 5
2929
}
3030

3131
// Tests for Approach2
3232
@Test
33-
public void testGetMaxSumApproach2_WithEmptyArray() {
33+
public void testGetMaxSumApproach2WithEmptyArray() {
3434
assertEquals(0, MaximumSumOfNonAdjacentElements.getMaxSumApproach2(new int[] {})); // Empty array
3535
}
3636

3737
@Test
38-
public void testGetMaxSumApproach2_WithSingleElement() {
38+
public void testGetMaxSumApproach2WithSingleElement() {
3939
assertEquals(1, MaximumSumOfNonAdjacentElements.getMaxSumApproach2(new int[] {1})); // Single element
4040
}
4141

4242
@Test
43-
public void testGetMaxSumApproach2_WithTwoElements_TakeMax() {
43+
public void testGetMaxSumApproach2WithTwoElementsTakeMax() {
4444
assertEquals(2, MaximumSumOfNonAdjacentElements.getMaxSumApproach2(new int[] {1, 2})); // Take max of both
4545
}
4646

4747
@Test
48-
public void testGetMaxSumApproach2_WithMultipleElements() {
48+
public void testGetMaxSumApproach2WithMultipleElements() {
4949
assertEquals(15, MaximumSumOfNonAdjacentElements.getMaxSumApproach2(new int[] {3, 2, 5, 10, 7})); // 3 + 7 + 5
5050
assertEquals(10, MaximumSumOfNonAdjacentElements.getMaxSumApproach2(new int[] {5, 1, 1, 5})); // 5 + 5
5151
}

0 commit comments

Comments
 (0)