Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.dvorkin;
- import static org.junit.Assert.*;
- import org.junit.Before;
- import org.junit.Test;
- public class TestStringUtils {
- String s;
- @Before
- public void setUp() {
- s = "Hello, Denis!";
- }
- @Test
- public void testRemoveVowels() {
- assertEquals(StringUtils.removeVowels("hello"), "hll");
- assertEquals(StringUtils.removeVowels("HELLO"), "HLL");
- }
- @Test
- public void testSequential() {
- s = StringUtils.removeVowels(s);
- assertEquals(s, "Hll, Dns!");
- s = StringUtils.removeN(s);
- assertEquals(s, "Hll, Ds!");
- }
- @Test
- public void testSequential2() {
- s = StringUtils.removeN(s);
- assertEquals(s, "Hello, Deis!");
- s = StringUtils.removeVowels(s);
- assertEquals(s, "Hll, Ds!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement