/* 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();
	}
}

@@ -900,16 +900,66 @@
 ntrol;%0A%0A
+import java.io.File;%0Aimport java.io.IOException;%0A%0A
 import j
@@ -983,16 +983,16 @@
 stCase;%0A
-
 %0A/**%0A *%0A
@@ -1179,16 +1179,18 @@
 tIt() %7B%0A
+//
 %09%09Extern
@@ -1253,16 +1253,18 @@
 gPath);%0A
+//
 %09%09//asse
@@ -1327,32 +1327,34 @@
 50202020202%22));%0A
+//
 %09%09assertTrue(exc
@@ -1422,32 +1422,34 @@
 50202020202%22));%0A
+//
 %09%09assertTrue(exc
@@ -1521,32 +1521,34 @@
 50202020202%22));%0A
+//
 %09%09assertFalse(ex
@@ -1622,32 +1622,34 @@
 50202020202%22));%0A
+//
 %09%09assertFalse(ex
@@ -1719,32 +1719,34 @@
 50202020202%22));%0A
+//
 %09%09assertFalse(ex
@@ -1824,16 +1824,18 @@
 202%22));%0A
+//
 %09%09assert
@@ -1921,16 +1921,18 @@
 202%22));%0A
+//
 %09%09Extern
@@ -1957,10 +1957,12 @@
 n();%0A%09%7D%0A
+%09%0A
 %7D%0A

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