11package com .thealgorithms .geometry ;
22
3+ import static org .junit .jupiter .api .Assertions .assertTrue ;
4+
5+ import java .util .List ;
36import org .junit .jupiter .api .Test ;
47import org .junit .jupiter .params .ParameterizedTest ;
58import org .junit .jupiter .params .provider .CsvSource ;
69
7- import java .util .List ;
8-
9- import static org .junit .jupiter .api .Assertions .assertTrue ;
10-
1110/**
1211 * Test class for the {@code MidpointCircle} class
1312 */
@@ -16,20 +15,20 @@ class MidpointCircleTest {
1615 /**
1716 * Parameterized test to check the generated points for different circles.
1817 * The points are checked based on the expected center and radius.
19- *
18+ *
2019 * @param centerX The x-coordinate of the circle's center.
2120 * @param centerY The y-coordinate of the circle's center.
2221 * @param radius The radius of the circle.
2322 */
2423 @ ParameterizedTest
2524 @ CsvSource ({
26- "0, 0, 3" , // Circle centered at (0, 0) with radius 3
25+ "0, 0, 3" , // Circle centered at (0, 0) with radius 3
2726 "10, 10, 2" // Circle centered at (10, 10) with radius 2
2827 })
2928 void
3029 testGenerateCirclePoints (int centerX , int centerY , int radius ) {
3130 List <int []> points = MidpointCircle .generateCirclePoints (centerX , centerY , radius );
32-
31+
3332 // Ensure that all points satisfy the circle equation (x - centerX)^2 + (y - centerY)^2 = radius^2
3433 for (int [] point : points ) {
3534 int x = point [0 ];
0 commit comments