// Path: src/main/java/exceptions/InvalidColourException.java
// public class InvalidColourException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 1L;
// 
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.awt.Color;
import org.junit.Test;
import exceptions.InvalidColourException;
package coloring;




public class Xterm256Test {

	@Test
	public void canGetContrastColor() throws InvalidColourException{
		new Xterm256();
		assertEquals("grey85", Xterm256.getContrastColor("black").toLowerCase());
	}
	
	@Test
	public void testXterm256() throws InvalidColourException{
		Color c= Xterm256.xterm256ToColor(30);
		System.err.println(c.getRGB()); // Not sure how to interpret this number.
	}
	
	@Test
	public void testColorByInteger() throws InvalidColourException{
		new Xterm256();
		assertEquals(231, Xterm256.colorNameToXterm256("grey100"));
		assertEquals(231, Xterm256.colorNameToXterm256("231"));
		
		// Invalid colour
		boolean pass= false;
		try{
			Xterm256.colorNameToXterm256("foo");
// Path: src/main/java/exceptions/InvalidColourException.java
// public class InvalidColourException extends Exception {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 1L;
// 
// }


// Path: src/test/java/coloring/Xterm256Test.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.awt.Color;
import org.junit.Test;
import exceptions.InvalidColourException;

package coloring;




public class Xterm256Test {

	@Test
	public void canGetContrastColor() throws InvalidColourException{
		new Xterm256();
		assertEquals("grey85", Xterm256.getContrastColor("black").toLowerCase());
	}
	
	@Test
	public void testXterm256() throws InvalidColourException{
		Color c= Xterm256.xterm256ToColor(30);
		System.err.println(c.getRGB()); // Not sure how to interpret this number.
	}
	
	@Test
	public void testColorByInteger() throws InvalidColourException{
		new Xterm256();
		assertEquals(231, Xterm256.colorNameToXterm256("grey100"));
		assertEquals(231, Xterm256.colorNameToXterm256("231"));
		
		// Invalid colour
		boolean pass= false;
		try{
			Xterm256.colorNameToXterm256("foo");
		} catch(InvalidColourException e){