polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [6/9] polygene-java git commit: Minor, clean up CleanStackTraceTest
Date Mon, 10 Apr 2017 11:54:46 GMT
Minor, clean up CleanStackTraceTest


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/7f4048d7
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/7f4048d7
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/7f4048d7

Branch: refs/heads/develop
Commit: 7f4048d779753aa90f43eb69531ecc02112a60f4
Parents: 1cf686c
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Mon Apr 10 12:49:10 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Mon Apr 10 12:49:10 2017 +0200

----------------------------------------------------------------------
 .../test/composite/CleanStackTraceTest.java     | 26 ++++++++------------
 1 file changed, 10 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/7f4048d7/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
b/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
index c504baf..010f7ae 100644
--- a/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/test/composite/CleanStackTraceTest.java
@@ -30,7 +30,6 @@ import org.junit.Test;
 import org.apache.polygene.api.concern.Concerns;
 import org.apache.polygene.api.concern.GenericConcern;
 import org.apache.polygene.api.mixin.Mixins;
-import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 
 import static org.hamcrest.core.IsNull.notNullValue;
@@ -44,19 +43,16 @@ import static org.junit.Assume.assumeTrue;
  * NOTE: This satisfiedBy MUST NOT be inside package org.apache.polygene.runtime, or it will
fail.
  * </p>
  */
-public class CleanStackTraceTest
-    extends AbstractPolygeneTest
+public class CleanStackTraceTest extends AbstractPolygeneTest
 {
-
     @BeforeClass
     public static void beforeClass_IBMJDK()
-    {   
+    {
         assumeTrue( !( System.getProperty( "java.vendor" ).contains( "IBM" ) ) );
-    }   
+    }
 
     @Override
     public void assemble( ModuleAssembly module )
-        throws AssemblyException
     {
         module.transients( CleanStackTraceTest.TestComposite.class );
     }
@@ -82,14 +78,14 @@ public class CleanStackTraceTest
         {
             String separator = System.getProperty( "line.separator" );
             String correctTrace1 = "java.lang.RuntimeException: level 2" + separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:128)"
+ separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:141)"
+ separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:79)";
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:123)"
+ separator +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)"
+ separator +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:75)";
             assertEquality( e, correctTrace1 );
             String correctTrace2 = "java.lang.RuntimeException: level 1" + separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:124)"
+ separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:141)"
+ separator +
-                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:79)";
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$DoStuffMixin.doStuff(CleanStackTraceTest.java:119)"
+ separator +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest$NillyWilly.invoke(CleanStackTraceTest.java:135)"
+ separator +
+                                   "\tat org.apache.polygene.test.composite.CleanStackTraceTest.cleanStackTraceOnApplicationException(CleanStackTraceTest.java:75)";
             assertThat( e.getCause(), notNullValue() );
             assertEquality( e.getCause(), correctTrace2 );
         }
@@ -106,7 +102,7 @@ public class CleanStackTraceTest
     }
 
     @Concerns( NillyWilly.class )
-    @Mixins(DoStuffMixin.class)
+    @Mixins( DoStuffMixin.class )
     public interface TestComposite
     {
         void doStuff();
@@ -115,7 +111,6 @@ public class CleanStackTraceTest
     public static class DoStuffMixin
         implements TestComposite
     {
-
         @Override
         public void doStuff()
         {
@@ -133,7 +128,6 @@ public class CleanStackTraceTest
     static class NillyWilly extends GenericConcern
         implements InvocationHandler
     {
-
         @Override
         public Object invoke( Object proxy, Method method, Object[] args )
             throws Throwable


Mime
View raw message