Update method names

This commit is contained in:
anujgaud 2024-04-02 22:14:57 +05:30 committed by GitHub
parent e73a578dbd
commit dbd9448e99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ import org.junit.jupiter.api.Test;
public class SetMatrixToZeroUnitTest{ public class SetMatrixToZeroUnitTest{
@Test @Test
void givenMatrix_whenUsingBruteForce_thenSetZeroes() { void givenMatrix_whenUsingSetZeroesByNaiveApproach_thenSetZeroes() {
int[][] matrix = { int[][] matrix = {
{1, 2, 3}, {1, 2, 3},
{4, 0, 6}, {4, 0, 6},
@ -16,12 +16,12 @@ public class SetMatrixToZeroUnitTest{
{0, 0, 0}, {0, 0, 0},
{7, 0, 9} {7, 0, 9}
}; };
SetMatrixToZero.setZeroesBruteForce(matrix); SetMatrixToZero.setZeroesByNaiveApproach(matrix);
assertArrayEquals(expected, matrix); assertArrayEquals(expected, matrix);
} }
@Test @Test
void givenMatrix_whenUsingExtraSpace_thenSetZeroes() { void givenMatrix_whenUsingSetZeroesByTimeOptimizedApproach_thenSetZeroes() {
int[][] matrix = { int[][] matrix = {
{1, 2, 3}, {1, 2, 3},
{4, 0, 6}, {4, 0, 6},
@ -32,12 +32,12 @@ public class SetMatrixToZeroUnitTest{
{0, 0, 0}, {0, 0, 0},
{7, 0, 9} {7, 0, 9}
}; };
SetMatrixToZero.setZeroesExtraSpace(matrix); SetMatrixToZero.setZeroesByTimeOptimizedApproach(matrix);
assertArrayEquals(expected, matrix); assertArrayEquals(expected, matrix);
} }
@Test @Test
void givenMatrix_whenUsingOptimized_thenSetZeroes() { void givenMatrix_whenUsingSetZeroesByOptimalApproach_thenSetZeroes() {
int[][] matrix = { int[][] matrix = {
{1, 2, 3}, {1, 2, 3},
{4, 0, 6}, {4, 0, 6},
@ -48,7 +48,7 @@ public class SetMatrixToZeroUnitTest{
{0, 0, 0}, {0, 0, 0},
{7, 0, 9} {7, 0, 9}
}; };
SetMatrixToZero.setZeroesOptimized(matrix); SetMatrixToZero.setZeroesByOptimalApproach(matrix);
assertArrayEquals(expected, matrix); assertArrayEquals(expected, matrix);
} }
} }