/* ExternalExcluderTest
 *
 * $Id$
 *
 * Created on 4:01:25 PM Aug 21, 2007.
 *
 * Copyright (C) 2007 Internet Archive.
 *
 * This file is part of wayback-core.
 *
 * wayback-core is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * any later version.
 *
 * wayback-core is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser Public License for more details.
 *
 * You should have received a copy of the GNU Lesser Public License
 * along with wayback-core; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package org.archive.wayback.accesscontrol;

import junit.framework.TestCase;

/**
 *
 *
 * @author brad
 * @version $Date$, $Revision$
 */
public class ExternalExcluderTest extends TestCase {
	String configPath = "/tmp/external.xml";
	/**
	 * 
	 */
	public void testIt() {
		ExternalExcluder excluder = ExternalExcluder.getExcluder(configPath);
		//assertFalse(excluder.isExcluded("http://archive.torg/", "20050202020202"));
		assertTrue(excluder.isExcluded("http://archive.org/cgi-bin/test.html", "20050202020202"));
		assertTrue(excluder.isExcluded("http://www.archive.org/cgi-bin/test.html", "20050202020202"));
		assertFalse(excluder.isExcluded("http://www.archive.org/cgi-brin/test.html", "20050202020202"));
		assertFalse(excluder.isExcluded("http://archive.org/cgi-brin/test.html", "20050202020202"));
		assertFalse(excluder.isExcluded("http://archive.com/cgi-brin/test.html", "20050202020202"));
		assertTrue(excluder.isExcluded("http://archives.com/cgi-brin/test.html", "20050202020202"));
		ExternalExcluder.shutdown();
	}
}

/* ExternalExcluderTest
 *
 * $Id$
 *
 * Created on 4:01:25 PM Aug 21, 2007.
 *
 * Copyright (C) 2007 Internet Archive.
 *
 * This file is part of wayback-core.
 *
 * wayback-core is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * any later version.
 *
 * wayback-core is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser Public License for more details.
 *
 * You should have received a copy of the GNU Lesser Public License
 * along with wayback-core; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package org.archive.wayback.accesscontrol;

import java.io.File;
import java.io.IOException;

import junit.framework.TestCase;

/**
 *
 *
 * @author brad
 * @version $Date$, $Revision$
 */
public class ExternalExcluderTest extends TestCase {
	String configPath = "/tmp/external.xml";
	/**
	 * 
	 */
	public void testIt() {
//		ExternalExcluder excluder = ExternalExcluder.getExcluder(configPath);
//		//assertFalse(excluder.isExcluded("http://archive.torg/", "20050202020202"));
//		assertTrue(excluder.isExcluded("http://archive.org/cgi-bin/test.html", "20050202020202"));
//		assertTrue(excluder.isExcluded("http://www.archive.org/cgi-bin/test.html", "20050202020202"));
//		assertFalse(excluder.isExcluded("http://www.archive.org/cgi-brin/test.html", "20050202020202"));
//		assertFalse(excluder.isExcluded("http://archive.org/cgi-brin/test.html", "20050202020202"));
//		assertFalse(excluder.isExcluded("http://archive.com/cgi-brin/test.html", "20050202020202"));
//		assertTrue(excluder.isExcluded("http://archives.com/cgi-brin/test.html", "20050202020202"));
//		ExternalExcluder.shutdown();
	}
	
}

test requires some extra resources -- commenting out working components for the moment.