| 1234567891011121314151617181920212223242526272829303132 |
- package rocks.zipcode.quiz5.fundamentals.stringutils;
-
- import org.junit.Assert;
- import org.junit.Test;
- import rocks.zipcode.quiz5.fundamentals.StringUtils;
-
- public class CapitalizeMiddleCharacterTest {
- @Test
- public void test1() {
- // given
- String input = "o";
- String expected = "O";
- test(expected, input);
- }
-
- @Test
- public void test2() {
- // given
- String input = "ooo";
- String expected = "oOo";
- test(expected, input);
- }
-
- private void test(String expected, String input) {
- // when
- String actual = StringUtils.capitalizeMiddleCharacter(input);
-
- // then
- Assert.assertEquals(expected, actual);
- }
- }
|