o minor javadoc updates
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@628964 13f79535-47bb-0310-9956-ffa450edef68master
parent
61328e55f0
commit
39524c627f
|
|
@ -25,20 +25,34 @@ package org.apache.maven.plugin.testing;
|
||||||
* @author jesse
|
* @author jesse
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
public class ConfigurationException extends Exception
|
public class ConfigurationException
|
||||||
|
extends Exception
|
||||||
{
|
{
|
||||||
|
/** serialVersionUID */
|
||||||
|
static final long serialVersionUID = -6180939638742159065L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param message The detailed message.
|
||||||
|
*/
|
||||||
public ConfigurationException( String message )
|
public ConfigurationException( String message )
|
||||||
{
|
{
|
||||||
super(message);
|
super( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param cause The detailed cause.
|
||||||
|
*/
|
||||||
public ConfigurationException( Throwable cause )
|
public ConfigurationException( Throwable cause )
|
||||||
{
|
{
|
||||||
super(cause);
|
super( cause );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param message The detailed message.
|
||||||
|
* @param cause The detailed cause.
|
||||||
|
*/
|
||||||
public ConfigurationException( String message, Throwable cause )
|
public ConfigurationException( String message, Throwable cause )
|
||||||
{
|
{
|
||||||
super(message, cause);
|
super( message, cause );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,10 @@ public class StubArtifactResolver
|
||||||
this.factory = factory;
|
this.factory = factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Creates dummy file and sets it in the artifact to simulate resolution
|
* Creates dummy file and sets it in the artifact to simulate resolution
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
*
|
||||||
* @see org.apache.maven.artifact.resolver.ArtifactResolver#resolve(org.apache.maven.artifact.Artifact,
|
* @see org.apache.maven.artifact.resolver.ArtifactResolver#resolve(org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository)
|
||||||
* java.util.List,
|
|
||||||
* org.apache.maven.artifact.repository.ArtifactRepository)
|
|
||||||
*/
|
*/
|
||||||
public void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
|
public void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
|
||||||
throws ArtifactResolutionException, ArtifactNotFoundException
|
throws ArtifactResolutionException, ArtifactNotFoundException
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,24 @@
|
||||||
package org.apache.maven.plugin.testing;
|
package org.apache.maven.plugin.testing;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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.IOException;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
@ -14,7 +33,6 @@ public class ArtifactStubFactoryTest
|
||||||
assertFalse(factory.getReleaseArtifact().isSnapshot());
|
assertFalse(factory.getReleaseArtifact().isSnapshot());
|
||||||
assertTrue(factory.getSnapshotArtifact().isSnapshot());
|
assertTrue(factory.getSnapshotArtifact().isSnapshot());
|
||||||
assertFalse(factory.getSnapshotArtifact().isRelease());
|
assertFalse(factory.getSnapshotArtifact().isRelease());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCreateFiles() throws IOException
|
public void testCreateFiles() throws IOException
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public class ExpressionEvaluatorMojo
|
||||||
|
|
||||||
private String workdir;
|
private String workdir;
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
public void execute()
|
public void execute()
|
||||||
throws MojoExecutionException, MojoFailureException
|
throws MojoExecutionException, MojoFailureException
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ public class ExpressionEvaluatorTest
|
||||||
|
|
||||||
private PlexusConfiguration pluginConfiguration;
|
private PlexusConfiguration pluginConfiguration;
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
protected void setUp()
|
protected void setUp()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
@ -64,6 +65,9 @@ public class ExpressionEvaluatorTest
|
||||||
pluginConfiguration = extractPluginConfiguration( "maven-test-mojo", pomDom );
|
pluginConfiguration = extractPluginConfiguration( "maven-test-mojo", pomDom );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception if any
|
||||||
|
*/
|
||||||
public void testInjection()
|
public void testInjection()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ public class MojoTestCaseTest
|
||||||
|
|
||||||
private PlexusConfiguration pluginConfiguration;
|
private PlexusConfiguration pluginConfiguration;
|
||||||
|
|
||||||
|
/** {@inheritDoc} */
|
||||||
protected void setUp()
|
protected void setUp()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
@ -64,6 +65,9 @@ public class MojoTestCaseTest
|
||||||
pluginConfiguration = extractPluginConfiguration( "maven-simple-plugin", pomDom );
|
pluginConfiguration = extractPluginConfiguration( "maven-simple-plugin", pomDom );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception if any
|
||||||
|
*/
|
||||||
public void testPluginConfigurationExtraction()
|
public void testPluginConfigurationExtraction()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
@ -72,6 +76,9 @@ public class MojoTestCaseTest
|
||||||
assertEquals( "valueTwo", pluginConfiguration.getChild( "keyTwo" ).getValue() );
|
assertEquals( "valueTwo", pluginConfiguration.getChild( "keyTwo" ).getValue() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception if any
|
||||||
|
*/
|
||||||
public void testMojoConfiguration()
|
public void testMojoConfiguration()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
@ -84,6 +91,9 @@ public class MojoTestCaseTest
|
||||||
assertEquals( "valueTwo", mojo.getKeyTwo() );
|
assertEquals( "valueTwo", mojo.getKeyTwo() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception if any
|
||||||
|
*/
|
||||||
public void testVariableAccessWithoutGetter()
|
public void testVariableAccessWithoutGetter()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
@ -96,7 +106,9 @@ public class MojoTestCaseTest
|
||||||
assertEquals( "valueTwo", (String)getVariableValueFromObject( mojo, "keyTwo" ) );
|
assertEquals( "valueTwo", (String)getVariableValueFromObject( mojo, "keyTwo" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception if any
|
||||||
|
*/
|
||||||
public void testVariableAccessWithoutGetter2()
|
public void testVariableAccessWithoutGetter2()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
@ -111,7 +123,9 @@ public class MojoTestCaseTest
|
||||||
assertEquals( "valueTwo", (String)map.get( "keyTwo" ) );
|
assertEquals( "valueTwo", (String)map.get( "keyTwo" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception if any
|
||||||
|
*/
|
||||||
public void testSettingMojoVariables()
|
public void testSettingMojoVariables()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue