Add tests for CountChar (#3334)

This commit is contained in:
Ricardo Ramos
2022-10-12 15:42:24 -03:00
committed by GitHub
parent c59fc923bf
commit c805437c0c
2 changed files with 19 additions and 13 deletions

View File

@ -0,0 +1,17 @@
package com.thealgorithms.others;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class CountCharTest {
@Test
void testCountCharacters(){
String input = "12345";
int expectedValue = 5;
assertEquals(expectedValue, CountChar.CountCharacters(input));
}
}