maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1694108 - in /maven/shared/trunk/maven-common-artifact-filters/src: main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ test/java/org/apache/maven/shared/artifact/filter/resolve/transform/
Date Tue, 04 Aug 2015 21:16:29 GMT
Author: rfscholte
Date: Tue Aug  4 21:16:29 2015
New Revision: 1694108

URL: http://svn.apache.org/r1694108
Log:
Also pick up scope
Add unit tests for Nodes
Remove unused imports

Added:
    maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNodeTest.java
    maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNodeTest.java
    maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNodeTest.java
Modified:
    maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java
    maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java
    maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNode.java
    maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformerTest.java
    maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformerTest.java

Modified: maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java?rev=1694108&r1=1694107&r2=1694108&view=diff
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java
(original)
+++ maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNode.java
Tue Aug  4 21:16:29 2015
@@ -46,6 +46,7 @@ class ArtifactIncludeNode implements Nod
         mavenDependency.setVersion( artifact.getVersion() );
         mavenDependency.setClassifier( artifact.getClassifier() );
         mavenDependency.setType( artifact.getType() );
+        mavenDependency.setScope( artifact.getScope() );
 
         return mavenDependency;
     }

Modified: maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java?rev=1694108&r1=1694107&r2=1694108&view=diff
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java
(original)
+++ maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNode.java
Tue Aug  4 21:16:29 2015
@@ -43,19 +43,20 @@ class EclipseAetherNode implements Node
     @Override
     public org.apache.maven.model.Dependency getDependency()
     {
-        if ( node.getDependency() == null )
+        Dependency nodeDependency = node.getDependency();
+
+        if ( nodeDependency == null )
         {
             return null;
         }
 
-        Dependency nodeDependency = node.getDependency();
-
         org.apache.maven.model.Dependency mavenDependency = new org.apache.maven.model.Dependency();
         mavenDependency.setGroupId( nodeDependency.getArtifact().getGroupId() );
         mavenDependency.setArtifactId( nodeDependency.getArtifact().getArtifactId() );
         mavenDependency.setVersion( nodeDependency.getArtifact().getVersion() );
         mavenDependency.setClassifier( nodeDependency.getArtifact().getClassifier() );
         mavenDependency.setType( nodeDependency.getArtifact().getProperty( ArtifactProperties.TYPE,
null ) );
+        mavenDependency.setScope( nodeDependency.getScope() );
 
         return mavenDependency;
     }

Modified: maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNode.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNode.java?rev=1694108&r1=1694107&r2=1694108&view=diff
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNode.java
(original)
+++ maven/shared/trunk/maven-common-artifact-filters/src/main/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNode.java
Tue Aug  4 21:16:29 2015
@@ -44,19 +44,20 @@ class SonatypeAetherNode implements Node
     @Override
     public org.apache.maven.model.Dependency getDependency()
     {
-        if ( node.getDependency() == null )
+        Dependency nodeDependency = node.getDependency();
+
+        if ( nodeDependency == null )
         {
             return null;
         }
         
-        Dependency nodeDependency = node.getDependency();
-
         org.apache.maven.model.Dependency mavenDependency = new org.apache.maven.model.Dependency();
         mavenDependency.setGroupId( nodeDependency.getArtifact().getGroupId() );
         mavenDependency.setArtifactId( nodeDependency.getArtifact().getArtifactId() );
         mavenDependency.setVersion( nodeDependency.getArtifact().getVersion() );
         mavenDependency.setClassifier( nodeDependency.getArtifact().getClassifier() );
         mavenDependency.setType( nodeDependency.getArtifact().getProperty( ArtifactProperties.TYPE,
null ) );
+        mavenDependency.setScope( nodeDependency.getScope() );
 
         return mavenDependency;
     }

Modified: maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformerTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformerTest.java?rev=1694108&r1=1694107&r2=1694108&view=diff
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformerTest.java
(original)
+++ maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeFilterTransformerTest.java
Tue Aug  4 21:16:29 2015
@@ -19,7 +19,8 @@ package org.apache.maven.shared.artifact
  * under the License.
  */
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -27,13 +28,9 @@ import java.util.List;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
-import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.apache.maven.plugin.testing.ArtifactStubFactory;
-import org.apache.maven.plugin.testing.stubs.ArtifactStub;
-import org.apache.maven.plugin.testing.stubs.StubArtifactRepository;
 import org.apache.maven.shared.artifact.filter.PatternExcludesArtifactFilter;
 import org.apache.maven.shared.artifact.filter.PatternIncludesArtifactFilter;
 import org.apache.maven.shared.artifact.filter.resolve.AbstractFilter;
@@ -45,17 +42,6 @@ import org.apache.maven.shared.artifact.
 import org.apache.maven.shared.artifact.filter.resolve.PatternInclusionsFilter;
 import org.apache.maven.shared.artifact.filter.resolve.ScopeFilter;
 import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter;
-import org.eclipse.aether.artifact.DefaultArtifact;
-import org.eclipse.aether.graph.DefaultDependencyNode;
-import org.eclipse.aether.graph.Dependency;
-import org.eclipse.aether.graph.DependencyNode;
-import org.eclipse.aether.util.filter.AndDependencyFilter;
-import org.eclipse.aether.util.filter.ExclusionsDependencyFilter;
-import org.eclipse.aether.util.filter.OrDependencyFilter;
-import org.eclipse.aether.util.filter.PatternExclusionsDependencyFilter;
-import org.eclipse.aether.util.filter.PatternInclusionsDependencyFilter;
-import org.eclipse.aether.util.filter.ScopeDependencyFilter;
-import org.junit.Ignore;
 import org.junit.Test;
 
 public class ArtifactIncludeFilterTransformerTest

Added: maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNodeTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNodeTest.java?rev=1694108&view=auto
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNodeTest.java
(added)
+++ maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/ArtifactIncludeNodeTest.java
Tue Aug  4 21:16:29 2015
@@ -0,0 +1,114 @@
+package org.apache.maven.shared.artifact.filter.resolve.transform;
+
+/*
+ * 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 static org.junit.Assert.assertEquals;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.plugin.testing.ArtifactStubFactory;
+import org.apache.maven.shared.artifact.filter.resolve.Node;
+import org.junit.Test;
+
+public class ArtifactIncludeNodeTest
+{
+    private ArtifactStubFactory artifactFactory = new ArtifactStubFactory();
+
+    @Test
+    public void testGAV() throws Exception
+    {
+        Node node = new ArtifactIncludeNode( newArtifact( "g:a:v", null ) );
+
+        Dependency dependency = node.getDependency();
+
+        assertEquals( "g", dependency.getGroupId() );
+        assertEquals( "a", dependency.getArtifactId() );
+        assertEquals( "v", dependency.getVersion() );
+        assertEquals( "", dependency.getClassifier() );
+        // This is different compared to AetherNodes. Here it's based on artifact, which
in the end always has a type.
+        assertEquals( "jar", dependency.getType() );
+    }
+
+    @Test
+    public void testClassifier() throws Exception
+    {
+        Node node = new ArtifactIncludeNode( newArtifact( "g:a::c:v", null ) );
+
+        Dependency dependency = node.getDependency();
+
+        assertEquals( "g", dependency.getGroupId() );
+        assertEquals( "a", dependency.getArtifactId() );
+        assertEquals( "v", dependency.getVersion() );
+        assertEquals( "c", dependency.getClassifier() );
+        // empty type stays empty type when using ArtifactStubFactory
+        assertEquals( "", dependency.getType() );
+    }
+
+    @Test
+    public void testType() throws Exception
+    {
+        Node node = new ArtifactIncludeNode( newArtifact( "g:a:pom:v", null ) );
+
+        Dependency dependency = node.getDependency();
+
+        assertEquals( "g", dependency.getGroupId() );
+        assertEquals( "a", dependency.getArtifactId() );
+        assertEquals( "v", dependency.getVersion() );
+        assertEquals( null, dependency.getClassifier() );
+        assertEquals( "pom", dependency.getType() );
+    }
+
+    @Test
+    public void testScope() throws Exception
+    {
+        Node node = new ArtifactIncludeNode( newArtifact( "g:a:v", "s" ) );
+
+        Dependency dependency = node.getDependency();
+
+        assertEquals( "g", dependency.getGroupId() );
+        assertEquals( "a", dependency.getArtifactId() );
+        assertEquals( "v", dependency.getVersion() );
+        assertEquals( "", dependency.getClassifier() );
+        assertEquals( "jar", dependency.getType() );
+        assertEquals( "s", dependency.getScope() );
+    }
+
+    private Artifact newArtifact( String coor, String scope )
+        throws Exception
+    {
+        String[] gav = coor.split( ":" );
+        if ( gav.length == 3 )
+        {
+            return artifactFactory.createArtifact( gav[0], gav[1], gav[2], scope );
+        }
+        else if ( gav.length == 4 )
+        {
+            return artifactFactory.createArtifact( gav[0], gav[1], gav[3], scope, gav[2],
null );
+        }
+        else if ( gav.length == 5 )
+        {
+            return artifactFactory.createArtifact( gav[0], gav[1], gav[4], scope, gav[2],
gav[3] );
+        }
+        else
+        {
+            throw new IllegalArgumentException( "Can't translate coor to an Artifact" );
+        }
+    }
+}

Modified: maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformerTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformerTest.java?rev=1694108&r1=1694107&r2=1694108&view=diff
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformerTest.java
(original)
+++ maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherFilterTransformerTest.java
Tue Aug  4 21:16:29 2015
@@ -19,14 +19,14 @@ package org.apache.maven.shared.artifact
  * under the License.
  */
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
 import org.apache.maven.artifact.ArtifactUtils;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.shared.artifact.filter.resolve.AbstractFilter;
 import org.apache.maven.shared.artifact.filter.resolve.AndFilter;
 import org.apache.maven.shared.artifact.filter.resolve.ExclusionsFilter;

Added: maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNodeTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNodeTest.java?rev=1694108&view=auto
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNodeTest.java
(added)
+++ maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/EclipseAetherNodeTest.java
Tue Aug  4 21:16:29 2015
@@ -0,0 +1,81 @@
+package org.apache.maven.shared.artifact.filter.resolve.transform;
+
+/*
+ * 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 static org.junit.Assert.assertEquals;
+
+import org.apache.maven.shared.artifact.filter.resolve.Node;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.eclipse.aether.graph.DefaultDependencyNode;
+import org.eclipse.aether.graph.Dependency;
+import org.eclipse.aether.graph.DependencyNode;
+import org.junit.Test;
+
+public class EclipseAetherNodeTest
+{
+    @Test
+    public void testGAV()
+    {
+        Node node = new EclipseAetherNode( newDependencyNode( "g:a:v", null ) );
+        
+        org.apache.maven.model.Dependency mavenDependency = node.getDependency();
+        
+        assertEquals( "g", mavenDependency.getGroupId()  );
+        assertEquals( "a", mavenDependency.getArtifactId()  );
+        assertEquals( "v", mavenDependency.getVersion() );
+        assertEquals( "", mavenDependency.getClassifier() );
+        assertEquals( null, mavenDependency.getType() );
+        assertEquals( "", mavenDependency.getScope() );
+    }
+
+    @Test
+    public void testClassifier()
+    {
+        Node node = new EclipseAetherNode( newDependencyNode( "g:a::c:v", null ) );
+        
+        org.apache.maven.model.Dependency mavenDependency = node.getDependency();
+        
+        assertEquals( "g", mavenDependency.getGroupId()  );
+        assertEquals( "a", mavenDependency.getArtifactId()  );
+        assertEquals( "v", mavenDependency.getVersion() );
+        assertEquals( "c", mavenDependency.getClassifier() );
+        assertEquals( null, mavenDependency.getType() );
+        assertEquals( "", mavenDependency.getScope() );
+    }
+    
+    @Test
+    public void testScope()
+    {
+        Node node = new EclipseAetherNode( newDependencyNode( "g:a:c:v", "s" ) );
+        
+        org.apache.maven.model.Dependency mavenDependency = node.getDependency();
+        
+        assertEquals( "g", mavenDependency.getGroupId()  );
+        assertEquals( "a", mavenDependency.getArtifactId()  );
+        assertEquals( "v", mavenDependency.getVersion() );
+        assertEquals( "", mavenDependency.getClassifier() );
+        assertEquals( null, mavenDependency.getType() );
+        assertEquals( "s", mavenDependency.getScope() );
+    }
+    private DependencyNode newDependencyNode( String string, String scope )
+    {
+        return new DefaultDependencyNode( new Dependency( new DefaultArtifact( string ),
scope ) );
+    }
+}

Added: maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNodeTest.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNodeTest.java?rev=1694108&view=auto
==============================================================================
--- maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNodeTest.java
(added)
+++ maven/shared/trunk/maven-common-artifact-filters/src/test/java/org/apache/maven/shared/artifact/filter/resolve/transform/SonatypeAetherNodeTest.java
Tue Aug  4 21:16:29 2015
@@ -0,0 +1,82 @@
+package org.apache.maven.shared.artifact.filter.resolve.transform;
+
+/*
+ * 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 static org.junit.Assert.assertEquals;
+
+import org.apache.maven.shared.artifact.filter.resolve.Node;
+import org.junit.Test;
+import org.sonatype.aether.graph.Dependency;
+import org.sonatype.aether.graph.DependencyNode;
+import org.sonatype.aether.util.artifact.DefaultArtifact;
+import org.sonatype.aether.util.graph.DefaultDependencyNode;
+
+public class SonatypeAetherNodeTest
+{
+    @Test
+    public void testGAV()
+    {
+        Node node = new SonatypeAetherNode( newDependencyNode( "g:a:v", null ) );
+        
+        org.apache.maven.model.Dependency mavenDependency = node.getDependency();
+        
+        assertEquals( "g", mavenDependency.getGroupId()  );
+        assertEquals( "a", mavenDependency.getArtifactId()  );
+        assertEquals( "v", mavenDependency.getVersion() );
+        assertEquals( "", mavenDependency.getClassifier() );
+        assertEquals( null, mavenDependency.getType() );
+        assertEquals( "", mavenDependency.getScope() );
+    }
+
+    @Test
+    public void testClassifier()
+    {
+        Node node = new SonatypeAetherNode( newDependencyNode( "g:a::c:v", null ) );
+        
+        org.apache.maven.model.Dependency mavenDependency = node.getDependency();
+        
+        assertEquals( "g", mavenDependency.getGroupId()  );
+        assertEquals( "a", mavenDependency.getArtifactId()  );
+        assertEquals( "v", mavenDependency.getVersion() );
+        assertEquals( "c", mavenDependency.getClassifier() );
+        assertEquals( null, mavenDependency.getType() );
+        assertEquals( "", mavenDependency.getScope() );
+    }
+
+    @Test
+    public void testScope()
+    {
+        Node node = new SonatypeAetherNode( newDependencyNode( "g:a:v", "s" ) );
+        
+        org.apache.maven.model.Dependency mavenDependency = node.getDependency();
+        
+        assertEquals( "g", mavenDependency.getGroupId()  );
+        assertEquals( "a", mavenDependency.getArtifactId()  );
+        assertEquals( "v", mavenDependency.getVersion() );
+        assertEquals( "", mavenDependency.getClassifier() );
+        assertEquals( null, mavenDependency.getType() );
+        assertEquals( "s", mavenDependency.getScope() );
+    }
+    
+    private DependencyNode newDependencyNode( String string, String scope )
+    {
+        return new DefaultDependencyNode( new Dependency( new DefaultArtifact( string ),
scope ) );
+    }
+}



Mime
View raw message