
3 changed files with 45 additions and 31 deletions
@ -0,0 +1,32 @@ |
|||
package foundation.pEp.jniadapter.test.templateAlice; |
|||
import static foundation.pEp.jniadapter.test.framework.TestLogger.*; |
|||
import foundation.pEp.jniadapter.test.framework.*; |
|||
import foundation.pEp.jniadapter.test.utils.*; |
|||
|
|||
class TestAlice { |
|||
public static void main(String[] args) throws Exception { |
|||
TestSuite.setVerbose(true); |
|||
TestSuite.setTestColor(TestUtils.TermColor.GREEN); |
|||
|
|||
new TestUnit<AdapterBaseTestContext>("Test Alice",new AdapterBaseTestContext() , ctx -> { |
|||
// do stuff using the context
|
|||
// Test FAILS on unhandled exception, otherwise SUCCESS
|
|||
|
|||
ctx.alice = ctx.engine.myself(ctx.alice); |
|||
|
|||
if(ctx.alice.fpr == null) { |
|||
throw new RuntimeException(); |
|||
} |
|||
|
|||
for(int i=0; i < 1000; i++ ) { |
|||
log("Alice is waiting..."); |
|||
TestUtils.sleep(1000); |
|||
} |
|||
|
|||
}).add(); |
|||
|
|||
TestSuite.run(); |
|||
} |
|||
} |
|||
|
|||
|
@ -1,21 +0,0 @@ |
|||
package foundation.pEp.jniadapter.test.templateAlice; |
|||
import foundation.pEp.jniadapter.test.framework.*; |
|||
import foundation.pEp.jniadapter.test.utils.AdapterBaseTestContext; |
|||
|
|||
|
|||
class TestMain { |
|||
public static void main(String[] args) throws Exception { |
|||
new TestUnit<AdapterBaseTestContext>("Test Template",new AdapterBaseTestContext() , ctx -> { |
|||
// do stuff using the context
|
|||
// Test FAILS on unhandled exception, otherwise SUCCESS
|
|||
|
|||
ctx.alice = ctx.engine.myself(ctx.alice); |
|||
|
|||
if(ctx.alice.fpr == null) { |
|||
throw new RuntimeException(); |
|||
} |
|||
}).run(); |
|||
} |
|||
} |
|||
|
|||
|
Loading…
Reference in new issue