Add test for Upper (#3001)

This commit is contained in:
Aldo Telese 2022-04-04 10:21:53 +02:00 committed by GitHub
parent 1b02b41fcc
commit 140f6ec6e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
package com.thealgorithms.strings;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class UpperTest {
@Test
public void toUpperCase() {
String input1 = "hello world";
String input2 = "hElLo WoRlD";
String input3 = "HELLO WORLD";
assertEquals("HELLO WORLD", Upper.toUpperCase(input1));
assertEquals("HELLO WORLD", Upper.toUpperCase(input2));
assertEquals("HELLO WORLD", Upper.toUpperCase(input3));
}
}