Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationConfiguration.java')
-rw-r--r--jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationConfiguration.java40
1 files changed, 7 insertions, 33 deletions
diff --git a/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationConfiguration.java b/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationConfiguration.java
index af1ec022c6..764aaddaf0 100644
--- a/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationConfiguration.java
+++ b/jetty-annotations/src/test/java/org/eclipse/jetty/annotations/TestAnnotationConfiguration.java
@@ -14,18 +14,16 @@
package org.eclipse.jetty.annotations;
import java.io.File;
-import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
-import java.util.List;
+
+import junit.framework.TestCase;
import org.eclipse.jetty.util.resource.Resource;
-import org.eclipse.jetty.webapp.Fragment;
+import org.eclipse.jetty.webapp.FragmentDescriptor;
import org.eclipse.jetty.webapp.WebAppContext;
-import junit.framework.TestCase;
-
/**
* TestAnnotationConfiguration
*
@@ -34,31 +32,7 @@ import junit.framework.TestCase;
public class TestAnnotationConfiguration extends TestCase
{
- /**
- * Test method for {@link org.eclipse.jetty.annotations.AbstractConfiguration#parseWebInfLib(org.eclipse.jetty.webapp.WebAppContext, org.eclipse.jetty.annotations.AnnotationParser)}.
- */
- public void testExclusions()
- throws Exception
- {
- AnnotationConfiguration config = new AnnotationConfiguration();
- WebAppContext wac = new WebAppContext();
-
- Resource r = Resource.newResource("file:///home/janb/file.jar");
- List<String> orderedJars = new ArrayList<String>();
-
- //empty ordering excludes all jars
- assertTrue(config.isExcluded(r, orderedJars));
-
- //an ordering with name included
- orderedJars.add("file.jar");
- orderedJars.add("abc.jar");
- orderedJars.add("xyz.jar");
- assertFalse(config.isExcluded(r, orderedJars));
-
- //an ordering with name excluded
- orderedJars.remove("file.jar");
- assertTrue(config.isExcluded(r, orderedJars));
- }
+
public void testGetFragmentFromJar ()
@@ -74,9 +48,9 @@ public class TestAnnotationConfiguration extends TestCase
AnnotationConfiguration config = new AnnotationConfiguration();
WebAppContext wac = new WebAppContext();
- List<Fragment> frags = new ArrayList<Fragment>();
- frags.add(new Fragment(Resource.newResource("jar:"+url+"file.jar!/fooa.props"), null));
- frags.add(new Fragment(Resource.newResource("jar:"+url+"file2.jar!/foob.props"), null));
+ List<FragmentDescriptor> frags = new ArrayList<FragmentDescriptor>();
+ frags.add(new FragmentDescriptor(Resource.newResource("jar:"+url+"file.jar!/fooa.props"), null));
+ frags.add(new FragmentDescriptor(Resource.newResource("jar:"+url+"file2.jar!/foob.props"), null));
assertNotNull(config.getFragmentFromJar(jar1, frags));
}

Back to the top