style: enable MethodName in CheckStyle (#5182)

enabled: MethodName in CheckStyle
This commit is contained in:
Godwill Christopher
2024-05-27 01:06:06 -06:00
committed by GitHub
parent ea4dc15a24
commit 295e7436b1
53 changed files with 225 additions and 225 deletions

View File

@ -9,7 +9,7 @@ public class KnapsackMemoizationTest {
KnapsackMemoization knapsackMemoization = new KnapsackMemoization();
@Test
void Test1() {
void test1() {
int[] weight = {1, 3, 4, 5};
int[] value = {1, 4, 5, 7};
int capacity = 10;
@ -17,7 +17,7 @@ public class KnapsackMemoizationTest {
}
@Test
void Test2() {
void test2() {
int[] weight = {95, 4, 60, 32, 23, 72, 80, 62, 65, 46};
int[] value = {55, 10, 47, 5, 4, 50, 8, 61, 85, 87};
int capacity = 269;
@ -25,7 +25,7 @@ public class KnapsackMemoizationTest {
}
@Test
void Test3() {
void test3() {
int[] weight = {10, 20, 30};
int[] value = {60, 100, 120};
int capacity = 50;

View File

@ -42,7 +42,7 @@ public class LongestIncreasingSubsequenceTests {
{3, new int[] {1, 1, 2, 2, 2, 3, 3, 3, 3}},
};
final List<IntArrayToInt> methods = Arrays.asList(LongestIncreasingSubsequence::LIS, LongestIncreasingSubsequence::findLISLen);
final List<IntArrayToInt> methods = Arrays.asList(LongestIncreasingSubsequence::lis, LongestIncreasingSubsequence::findLISLen);
return Stream.of(testData).flatMap(input -> methods.stream().map(method -> Arguments.of(input[0], input[1], method)));
}

View File

@ -8,52 +8,52 @@ import org.junit.jupiter.api.Test;
public class UniquePathsTests {
@Test
public void testUniquePaths_3x3() {
public void testUniquePaths3x3() {
assertEquals(6, UniquePaths.uniquePaths(3, 3));
}
@Test
public void testUniquePaths_1x1() {
public void testUniquePaths1x1() {
assertEquals(1, UniquePaths.uniquePaths(1, 1));
}
@Test
public void testUniquePaths_3x7() {
public void testUniquePaths3x7() {
assertEquals(28, UniquePaths.uniquePaths(3, 7));
}
@Test
public void testUniquePaths_7x3() {
public void testUniquePaths7x3() {
assertEquals(28, UniquePaths.uniquePaths(7, 3));
}
@Test
public void testUniquePaths_100x100() {
public void testUniquePaths100x100() {
assertThrows(ArithmeticException.class, () -> UniquePaths.uniquePaths(100, 100));
}
@Test
public void testUniquePaths2_3x3() {
public void testUniquePathsII3x3() {
assertEquals(6, UniquePaths.uniquePaths2(3, 3));
}
@Test
public void testUniquePaths2_1x1() {
public void testUniquePathsII1x1() {
assertEquals(1, UniquePaths.uniquePaths2(1, 1));
}
@Test
public void testUniquePaths2_3x7() {
public void testUniquePathsII3x7() {
assertEquals(28, UniquePaths.uniquePaths2(3, 7));
}
@Test
public void testUniquePaths2_7x3() {
public void testUniquePathsII7x3() {
assertEquals(28, UniquePaths.uniquePaths2(7, 3));
}
@Test
public void testUniquePaths2_100x100() {
public void testUniquePathsII100x100() {
assertThrows(ArithmeticException.class, () -> UniquePaths.uniquePaths2(100, 100));
}
}