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