// Path: src/main/java/com/asolutions/scmsshd/commands/filters/BadCommandException.java
// public class BadCommandException extends Exception {
// 
// 	private static final long serialVersionUID = 4904880805323643780L;
// 
// 	public BadCommandException(String reason) {
// 		super(reason);
// 	}
// 
// 	public BadCommandException() {
// 	}
// 
// }


import static org.junit.Assert.fail;
import org.junit.Test;
import com.asolutions.scmsshd.commands.filters.BadCommandException;
package com.asolutions.scmsshd.commands;




public class AllowedCommandCheckerTest {

	@Test
	public void testParsesGitCommands() throws Exception {
		new AllowedCommandChecker("git-upload-pack");
		new AllowedCommandChecker("git upload-pack");
		new AllowedCommandChecker("git-receive-pack");
		new AllowedCommandChecker("git receive-pack");
	}
	
	@Test
	public void testFailsOnUnknownCommand() throws Exception {
		try{
			new AllowedCommandChecker("git receive-packs");
			fail("Didn't Throw");
		}
// Path: src/main/java/com/asolutions/scmsshd/commands/filters/BadCommandException.java
// public class BadCommandException extends Exception {
// 
// 	private static final long serialVersionUID = 4904880805323643780L;
// 
// 	public BadCommandException(String reason) {
// 		super(reason);
// 	}
// 
// 	public BadCommandException() {
// 	}
// 
// }


// Path: src/test/java/com/asolutions/scmsshd/commands/AllowedCommandCheckerTest.java
import static org.junit.Assert.fail;
import org.junit.Test;
import com.asolutions.scmsshd.commands.filters.BadCommandException;

package com.asolutions.scmsshd.commands;




public class AllowedCommandCheckerTest {

	@Test
	public void testParsesGitCommands() throws Exception {
		new AllowedCommandChecker("git-upload-pack");
		new AllowedCommandChecker("git upload-pack");
		new AllowedCommandChecker("git-receive-pack");
		new AllowedCommandChecker("git receive-pack");
	}
	
	@Test
	public void testFailsOnUnknownCommand() throws Exception {
		try{
			new AllowedCommandChecker("git receive-packs");
			fail("Didn't Throw");
		}
		catch (BadCommandException e){