1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package com.simpligility.maven.plugins.android.sample;
20
21 import io.takari.maven.testing.TestResources;
22 import io.takari.maven.testing.executor.MavenExecutionResult;
23 import io.takari.maven.testing.executor.MavenRuntime;
24 import io.takari.maven.testing.executor.MavenVersions;
25 import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder;
26 import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner;
27
28 import java.io.File;
29
30 import org.junit.Ignore;
31 import org.junit.Rule;
32 import org.junit.Test;
33 import org.junit.runner.RunWith;
34
35 import com.simpligility.maven.plugins.android.PluginInfo;
36
37
38
39
40
41
42
43 @Ignore("Experimental test, currently fails, activate for development of Jack support")
44 @RunWith(MavenJUnitTestRunner.class)
45 @MavenVersions({"3.0.5", "3.3.9"})
46 public class JackedHelloFlashLightSampleIT {
47
48 @Rule
49 public final TestResources resources = new TestResources();
50
51 public final MavenRuntime mavenRuntime;
52
53 public JackedHelloFlashLightSampleIT(MavenRuntimeBuilder builder) throws Exception {
54 this.mavenRuntime = builder.build();
55 }
56
57 @Test
58 public void buildDeployAndRun() throws Exception {
59 File basedir = resources.getBasedir( "helloflashlight_jack" );
60 MavenExecutionResult result = mavenRuntime
61 .forProject(basedir)
62 .execute( "clean", PluginInfo.getQualifiedGoal( "undeploy" ),
63 "install", PluginInfo.getQualifiedGoal( "deploy" ),
64 PluginInfo.getQualifiedGoal( "run" ) );
65
66 result.assertErrorFreeLog();
67 result.assertLogText( "Successfully installed" );
68 result.assertLogText( "Attempting to start com.simpligility.android.helloflashlight/com.simpligility.android.helloflashlight.HelloFlashlight" );
69 }
70
71 }