View Javadoc
1   /*
2    * Copyright (C) 2014 simpligility technologies inc.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package com.simpligility.maven.plugins.android.sample;
17  
18  import io.takari.maven.testing.TestResources;
19  import io.takari.maven.testing.executor.MavenExecutionResult;
20  import io.takari.maven.testing.executor.MavenRuntime;
21  import io.takari.maven.testing.executor.MavenVersions;
22  import io.takari.maven.testing.executor.MavenRuntime.MavenRuntimeBuilder;
23  import io.takari.maven.testing.executor.junit.MavenJUnitTestRunner;
24  
25  import java.io.File;
26  
27  import org.junit.Ignore;
28  import org.junit.Rule;
29  import org.junit.Test;
30  import org.junit.runner.RunWith;
31  
32  import com.simpligility.maven.plugins.android.PluginInfo;
33  
34  @RunWith(MavenJUnitTestRunner.class)
35  @MavenVersions({"3.3.9"})
36  public class MorseflashSampleIT {
37    
38    @Rule
39    public final TestResources resources = new TestResources();
40    
41    public final MavenRuntime mavenRuntime;
42    
43    public MorseflashSampleIT(MavenRuntimeBuilder builder) throws Exception {
44      this.mavenRuntime = builder.build();
45    }
46    
47    @Ignore
48    @Test
49    public void buildDeployAndRun() throws Exception {
50      File basedir = resources.getBasedir( "morseflash" );
51      MavenExecutionResult result = mavenRuntime
52            .forProject(basedir)
53            .withCliOptions("-Psupport_test")
54            .execute( "clean", PluginInfo.getQualifiedGoal( "undeploy" ), 
55                "install" );
56      
57      result.assertErrorFreeLog();
58      result.assertLogText( "Running instrumentation tests in com.simpligility.android.morseflash.tests" );
59    }
60  
61  }