//package tests;

import org.junit.*;
import static org.junit.Assert.*;

public class WordManipulatorTest {
	@Test
	public void fixcase1() {
		String s = "HelLo";
		assertTrue(WordManipulator.fixCase(s, true).compareTo(s) == 0);
	}
	@Test
	public void fixcase2() {
		assertTrue(WordManipulator.fixCase("HEllO", false).compareTo("hello") == 0);
	}

	@Test
	public void garbage1() {
		assertTrue(WordManipulator.strip(" hello", true).compareTo("hello") == 0);
	}
	@Test
	public void garbage2() {
		assertTrue(WordManipulator.strip("hello ", true).compareTo("hello") == 0);
	}
	@Test
	public void garbage3() {
		assertTrue(WordManipulator.strip(" hello ", true).compareTo("hello") == 0);
	}
	@Test
	public void garbage4() {
		assertTrue(WordManipulator.strip(" . hello& ;  ", true).compareTo("hello") == 0);
	}

	@Test
	public void digits1() {
		assertTrue(WordManipulator.strip("8hello", false).compareTo("hello") == 0);
	}
	@Test
	public void digits2() {
		assertTrue(WordManipulator.strip("hello9", false).compareTo("hello") == 0);
	}
	@Test
	public void digits3() {
		assertTrue(WordManipulator.strip("8hello9", false).compareTo("hello") == 0);
	}
	@Test
	public void digits4() {
		assertTrue(WordManipulator.strip("8hello9", true).compareTo("8hello9") == 0);
	}
	@Test
	public void digits5() {
		assertTrue(WordManipulator.strip("8he777llo9", true).compareTo("8he777llo9") == 0);
	}
	@Test
	public void digits6() {
		assertTrue(WordManipulator.strip("12340", false).compareTo("") == 0);
	}
}

