org.apache.maven.plugin.jar
Class JarSignMojoTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.maven.plugin.jar.JarSignMojoTest
All Implemented Interfaces:
junit.framework.Test

public class JarSignMojoTest
extends junit.framework.TestCase

These unit tests only check whether the generated command lines are correct. Really running the command would mean checking the results, which is too painful and not really a unit test. It would probably require to 'jarsigner -verify' the resulting signed jar and I believe it would make the code too complex with very few benefits.

Version:
$Id: JarSignMojoTest.java 728546 2008-12-21 22:56:51Z bentmann $
Author:
Jerome Lacoste

Constructor Summary
JarSignMojoTest()
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void testRunError()
           
 void testRunFailure()
           
 void testRunOK()
           
 void testRunTwice()
          We shouldn't sign the jar twice.
 void testVerifyInPlaceSignedJar()
           
 void testVerifyJarGeneratedBySignOperation()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JarSignMojoTest

public JarSignMojoTest()
Method Detail

setUp

public void setUp()
           throws IOException
Overrides:
setUp in class junit.framework.TestCase
Throws:
IOException

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

testRunOK

public void testRunOK()
               throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

testVerifyJarGeneratedBySignOperation

public void testVerifyJarGeneratedBySignOperation()
                                           throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

testVerifyInPlaceSignedJar

public void testVerifyInPlaceSignedJar()
                                throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

testRunTwice

public void testRunTwice()
                  throws org.apache.maven.plugin.MojoExecutionException,
                         IOException
We shouldn't sign the jar twice. On the second run, we simulated a created and signed jar.

Throws:
org.apache.maven.plugin.MojoExecutionException
IOException

testRunFailure

public void testRunFailure()

testRunError

public void testRunError()


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.