Skip to content

Commit f4cf148

Browse files
authored
refactor: revise obsolete kata logic (#855)
Method name has changed from `second_symbol` to `secondSymbol`.
1 parent 0ce13be commit f4cf148

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
interface SecondOcurrence {
2-
static int second_symbol(String str, char c) {
2+
static int secondSymbol(String str, char c) {
33
return str.indexOf(c, str.indexOf(c) + 1);
44
}
55
}

kata/7-kyu/find-the-index-of-the-second-occurrence-of-a-letter-in-a-string/test/SolutionTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
class SolutionTest {
66
@Test
77
void sample() {
8-
assertEquals(3, SecondOcurrence.second_symbol("Hello world!!!", 'l'));
9-
assertEquals(7, SecondOcurrence.second_symbol("Hello world!!!", 'o'));
10-
assertEquals(-1, SecondOcurrence.second_symbol("Hello world!!!", 'A'));
11-
assertEquals(-1, SecondOcurrence.second_symbol("Hello", '!'));
12-
assertEquals(-1, SecondOcurrence.second_symbol("", 'q'));
8+
assertEquals(3, SecondOcurrence.secondSymbol("Hello world!!!", 'l'));
9+
assertEquals(7, SecondOcurrence.secondSymbol("Hello world!!!", 'o'));
10+
assertEquals(-1, SecondOcurrence.secondSymbol("Hello world!!!", 'A'));
11+
assertEquals(-1, SecondOcurrence.secondSymbol("Hello", '!'));
12+
assertEquals(-1, SecondOcurrence.secondSymbol("", 'q'));
1313
}
1414
}

0 commit comments

Comments
 (0)