This is an automated email from the ASF dual-hosted git repository. ebourg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
commit 75de6b5d61afac8e13621cffe63df892e602df26 Author: Emmanuel Bourg <ebo...@apache.org> AuthorDate: Wed Apr 8 23:18:23 2020 +0200 Test with an invalid profile --- .../java/org/apache/tomcat/jakartaee/MigrationTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java index e77925f..813ca55 100644 --- a/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java +++ b/src/test/java/org/apache/tomcat/jakartaee/MigrationTest.java @@ -90,4 +90,17 @@ public class MigrationTest { assertEquals("error code", "1", e.getMessage()); } } + + @Test + public void testInvalidProfile() throws Exception { + File sourceFile = new File("target/test-classes/HelloServlet.java"); + File migratedFile = new File("target/test-classes/HelloServlet.migrated.java"); + + try { + MigrationCLI.main(new String[] {"-profile=JSERV", sourceFile.getAbsolutePath(), migratedFile.getAbsolutePath()}); + fail("No error code returned"); + } catch (SecurityException e) { + assertEquals("error code", "1", e.getMessage()); + } + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org