Skip to content

Commit

Permalink
[MSHADE-382] Apply review suggestions
Browse files Browse the repository at this point in the history
- remove unit test case
- change it verification script from .bsh to .groovy

Co-authored-by: Markus Karg <markus@headcrashing.eu>
  • Loading branch information
aalmiray and mkarg committed Jun 25, 2021
1 parent 24bb536 commit b048c53
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 44 deletions.
Expand Up @@ -16,11 +16,5 @@
* specific language governing permissions and limitations
* under the License.
*/
import java.io.*;

File originalJarFile = new File( basedir, "target/original-skip-execution-1.0.jar" );

if ( originalJarFile.exists() )
{
throw new IllegalStateException( "Shading was not skipped." );
}
assert !(new File( basedir, "target/original-skip-execution-1.0.jar" ).exists()) : "Shading was not skipped."
Expand Up @@ -62,43 +62,6 @@
public class ShadeMojoTest
extends PlexusTestCase
{
public void testSkipShading() throws Exception
{
final ShadeMojo mojo = new ShadeMojo();

Exception thrown = null;
try
{
// execute without configuration expecting a failure
mojo.execute();
}
catch( Exception expected )
{
thrown = expected;
}

assertNotNull( thrown );

// set skip = true
Field skip = ShadeMojo.class.getDeclaredField( "skip" );
skip.setAccessible( true );
skip.set( mojo, Boolean.TRUE );

thrown = null;
try
{
// execute without configuration and skip
// should not cause any exceptions
mojo.execute();
}
catch( Exception unexpected )
{
thrown = unexpected;
}

assertNull( thrown );
}

public void testManifestTransformerSelection() throws Exception
{
final ShadeMojo mojo = new ShadeMojo();
Expand Down

0 comments on commit b048c53

Please sign in to comment.