mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 22:43:30 +08:00
Add tests for CountChar (#3334)
This commit is contained in:
17
src/test/java/com/thealgorithms/others/CountCharTest.java
Normal file
17
src/test/java/com/thealgorithms/others/CountCharTest.java
Normal 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));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user