Skip to content

Commit

Permalink
test: write test code CharacterOnlyOnce
Browse files Browse the repository at this point in the history
  • Loading branch information
rldnrl committed Nov 25, 2022
1 parent 68bf051 commit 536f2ae
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/programmers/lv0/CharacterOnlyOnceTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package programmers.lv0;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Assertions;

class CharacterOnlyOnceTest {
@Test
void solutionTest() {
String string1 = "abcabcadc";
String result1 = "d";
Assertions.assertEquals(CharacterOnlyOnce.solution(string1), result1);

String string2 = "abdc";
String result2 = "abcd";
Assertions.assertEquals(CharacterOnlyOnce.solution(string2), result2);

String string3 = "hello";
String result3 = "eho";
Assertions.assertEquals(CharacterOnlyOnce.solution(string3), result3);
}
}

0 comments on commit 536f2ae

Please sign in to comment.