mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-31 00:37:15 +08:00
style: enable MethodName
in CheckStyle (#5182)
enabled: MethodName in CheckStyle
This commit is contained in:

committed by
GitHub

parent
ea4dc15a24
commit
295e7436b1
@ -8,25 +8,25 @@ public class AverageTest {
|
||||
private static final double SMALL_VALUE = 0.00001d;
|
||||
|
||||
@Test
|
||||
public void testAverage_double_12() {
|
||||
public void testAverageDouble12() {
|
||||
double[] numbers = {3d, 6d, 9d, 12d, 15d, 18d, 21d};
|
||||
Assertions.assertEquals(12d, Average.average(numbers), SMALL_VALUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAverage_double_20() {
|
||||
public void testAverageDouble20() {
|
||||
double[] numbers = {5d, 10d, 15d, 20d, 25d, 30d, 35d};
|
||||
Assertions.assertEquals(20d, Average.average(numbers), SMALL_VALUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAverage_double_4_5() {
|
||||
public void testAverageDouble() {
|
||||
double[] numbers = {1d, 2d, 3d, 4d, 5d, 6d, 7d, 8d};
|
||||
Assertions.assertEquals(4.5d, Average.average(numbers), SMALL_VALUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAverage_int_5() {
|
||||
public void testAverageInt() {
|
||||
int[] numbers = {2, 4, 10};
|
||||
Assertions.assertEquals(5, Average.average(numbers));
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test;
|
||||
public class PythagoreanTripleTest {
|
||||
|
||||
@Test
|
||||
public void Testpythagoreantriple() {
|
||||
public void testPythagoreanTriple() {
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(3, 4, 5));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(6, 8, 10));
|
||||
assertTrue(PythagoreanTriple.isPythagTriple(9, 12, 15));
|
||||
|
@ -7,21 +7,21 @@ public class SquareRootwithBabylonianMethodTest {
|
||||
|
||||
@Test
|
||||
void testfor4() {
|
||||
Assertions.assertEquals(2, SquareRootWithBabylonianMethod.square_Root(4));
|
||||
Assertions.assertEquals(2, SquareRootWithBabylonianMethod.squareRoot(4));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testfor1() {
|
||||
Assertions.assertEquals(1, SquareRootWithBabylonianMethod.square_Root(1));
|
||||
Assertions.assertEquals(1, SquareRootWithBabylonianMethod.squareRoot(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testfor2() {
|
||||
Assertions.assertEquals(1.4142135381698608, SquareRootWithBabylonianMethod.square_Root(2));
|
||||
Assertions.assertEquals(1.4142135381698608, SquareRootWithBabylonianMethod.squareRoot(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testfor625() {
|
||||
Assertions.assertEquals(25, SquareRootWithBabylonianMethod.square_Root(625));
|
||||
Assertions.assertEquals(25, SquareRootWithBabylonianMethod.squareRoot(625));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user