You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ma...@apache.org on 2007/09/14 15:50:02 UTC
svn commit: r575678 [2/2] - in
/maven/shared/trunk/maven-dependency-analyzer: ./
src/main/java/org/apache/maven/shared/dependency/analyzer/
src/main/java/org/apache/maven/shared/dependency/analyzer/asm/
src/test/java/org/apache/maven/shared/dependency/...
Modified: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/CollectorClassFileVisitorTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/CollectorClassFileVisitorTest.java?rev=575678&r1=575677&r2=575678&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/CollectorClassFileVisitorTest.java (original)
+++ maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/CollectorClassFileVisitorTest.java Fri Sep 14 06:49:58 2007
@@ -1,67 +1,67 @@
-package org.apache.maven.shared.dependency.analyzer;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.maven.shared.dependency.analyzer.CollectorClassFileVisitor;
-
-import junit.framework.TestCase;
-
-/**
- * Tests <code>CollectorClassFileVisitor</code>.
- *
- * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
- * @version $Id$
- * @see CollectorClassFileVisitor
- */
-public class CollectorClassFileVisitorTest
- extends TestCase
-{
- // fields -----------------------------------------------------------------
-
- private CollectorClassFileVisitor visitor;
-
- // TestCase thods ---------------------------------------------------------
-
- /*
- * @see junit.framework.TestCase#setUp()
- */
- protected void setUp()
- throws Exception
- {
- visitor = new CollectorClassFileVisitor();
- }
-
- // tests ------------------------------------------------------------------
-
- public void testVisitClass()
- {
- visitor.visitClass( "a.b.c", null );
- visitor.visitClass( "x.y.z", null );
-
- Set expected = new HashSet();
- expected.add( "a.b.c" );
- expected.add( "x.y.z" );
-
- assertEquals( expected, visitor.getClasses() );
- }
-}
+package org.apache.maven.shared.dependency.analyzer;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.maven.shared.dependency.analyzer.CollectorClassFileVisitor;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests <code>CollectorClassFileVisitor</code>.
+ *
+ * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
+ * @version $Id$
+ * @see CollectorClassFileVisitor
+ */
+public class CollectorClassFileVisitorTest
+ extends TestCase
+{
+ // fields -----------------------------------------------------------------
+
+ private CollectorClassFileVisitor visitor;
+
+ // TestCase thods ---------------------------------------------------------
+
+ /*
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp()
+ throws Exception
+ {
+ visitor = new CollectorClassFileVisitor();
+ }
+
+ // tests ------------------------------------------------------------------
+
+ public void testVisitClass()
+ {
+ visitor.visitClass( "a.b.c", null );
+ visitor.visitClass( "x.y.z", null );
+
+ Set expected = new HashSet();
+ expected.add( "a.b.c" );
+ expected.add( "x.y.z" );
+
+ assertEquals( expected, visitor.getClasses() );
+ }
+}
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/CollectorClassFileVisitorTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/CollectorClassFileVisitorTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/DefaultClassAnalyzerTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Fri Sep 14 06:49:58 2007
@@ -1 +1 @@
-Author Date Id HeadURL Revision
+"Author Date Id Revision"
Modified: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/InputStreamConstraint.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/InputStreamConstraint.java?rev=575678&r1=575677&r2=575678&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/InputStreamConstraint.java (original)
+++ maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/InputStreamConstraint.java Fri Sep 14 06:49:58 2007
@@ -1,100 +1,100 @@
-package org.apache.maven.shared.dependency.analyzer;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.codehaus.plexus.util.IOUtil;
-import org.jmock.core.Constraint;
-
-/**
- *
- *
- * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
- * @version $Id$
- */
-public class InputStreamConstraint
- implements Constraint
-{
- // constants --------------------------------------------------------------
-
- private static final String DEFAULT_CHARSET_NAME = "UTF-8";
-
- // fields -----------------------------------------------------------------
-
- private final String expected;
-
- private final String charsetName;
-
- // constructors -----------------------------------------------------------
-
- public InputStreamConstraint( String expected )
- {
- this( expected, DEFAULT_CHARSET_NAME );
- }
-
- public InputStreamConstraint( String expected, String charsetName )
- {
- this.expected = expected;
- this.charsetName = charsetName;
- }
-
- // Constraint methods -----------------------------------------------------
-
- /*
- * @see org.jmock.core.Constraint#eval(java.lang.Object)
- */
- public boolean eval( Object object )
- {
- if ( !( object instanceof InputStream ) )
- {
- return false;
- }
-
- InputStream in = (InputStream) object;
-
- try
- {
- String actual = IOUtil.toString( in, charsetName );
-
- return expected.equals( actual );
- }
- catch ( IOException exception )
- {
- return false;
- }
- }
-
- // SelfDescribing methods -------------------------------------------------
-
- /*
- * @see org.jmock.core.SelfDescribing#describeTo(java.lang.StringBuffer)
- */
- public StringBuffer describeTo( StringBuffer buffer )
- {
- buffer.append( "in(" );
- buffer.append( "\"" ).append( expected ).append( "\"" );
- buffer.append( "," ).append( charsetName );
- buffer.append( ")" );
-
- return buffer;
- }
-}
+package org.apache.maven.shared.dependency.analyzer;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.codehaus.plexus.util.IOUtil;
+import org.jmock.core.Constraint;
+
+/**
+ *
+ *
+ * @author <a href="mailto:markhobson@gmail.com">Mark Hobson</a>
+ * @version $Id$
+ */
+public class InputStreamConstraint
+ implements Constraint
+{
+ // constants --------------------------------------------------------------
+
+ private static final String DEFAULT_CHARSET_NAME = "UTF-8";
+
+ // fields -----------------------------------------------------------------
+
+ private final String expected;
+
+ private final String charsetName;
+
+ // constructors -----------------------------------------------------------
+
+ public InputStreamConstraint( String expected )
+ {
+ this( expected, DEFAULT_CHARSET_NAME );
+ }
+
+ public InputStreamConstraint( String expected, String charsetName )
+ {
+ this.expected = expected;
+ this.charsetName = charsetName;
+ }
+
+ // Constraint methods -----------------------------------------------------
+
+ /*
+ * @see org.jmock.core.Constraint#eval(java.lang.Object)
+ */
+ public boolean eval( Object object )
+ {
+ if ( !( object instanceof InputStream ) )
+ {
+ return false;
+ }
+
+ InputStream in = (InputStream) object;
+
+ try
+ {
+ String actual = IOUtil.toString( in, charsetName );
+
+ return expected.equals( actual );
+ }
+ catch ( IOException exception )
+ {
+ return false;
+ }
+ }
+
+ // SelfDescribing methods -------------------------------------------------
+
+ /*
+ * @see org.jmock.core.SelfDescribing#describeTo(java.lang.StringBuffer)
+ */
+ public StringBuffer describeTo( StringBuffer buffer )
+ {
+ buffer.append( "in(" );
+ buffer.append( "\"" ).append( expected ).append( "\"" );
+ buffer.append( "," ).append( charsetName );
+ buffer.append( ")" );
+
+ return buffer;
+ }
+}
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/InputStreamConstraint.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/InputStreamConstraint.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/ProjectDependencyAnalysisTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Fri Sep 14 06:49:58 2007
@@ -1 +1 @@
-Author Date Id HeadURL Revision
+"Author Date Id Revision"
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/ProjectDependencyAnalyzerExceptionTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Fri Sep 14 06:49:58 2007
@@ -1 +1 @@
-Author Date Id HeadURL Revision
+"Author Date Id Revision"
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/asm/DependencyVisitorTest.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Fri Sep 14 06:49:58 2007
@@ -1 +1 @@
-Author Date Id HeadURL Revision
+"Author Date Id Revision"
Propchange: maven/shared/trunk/maven-dependency-analyzer/src/test/java/org/apache/maven/shared/dependency/analyzer/asm/MockAttribute.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Fri Sep 14 06:49:58 2007
@@ -1 +1 @@
-Author Date Id HeadURL Revision
+"Author Date Id Revision"