1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.simpligility.maven.plugins.android.asm;
17
18 import org.apache.maven.plugin.MojoExecutionException;
19 import org.junit.Assert;
20 import org.junit.Test;
21
22 import com.simpligility.maven.plugins.android.asm.AndroidTestFinder;
23
24 import java.io.File;
25
26
27
28
29
30
31 public class AndroidTestFinderTest {
32 @Test
33 public void givenDirectoryWithoutTestsThenNoTests() throws MojoExecutionException {
34 final boolean result = AndroidTestFinder.containsAndroidTests(new File("target/test-classes/com/simpligility/maven/plugins/android/asm/withouttests"));
35 Assert.assertFalse("'withouttests' should not contain any tests.", result);
36 }
37 @Test
38 public void givenDirectoryWithTestsThenItContainsTests() throws MojoExecutionException {
39 final boolean result = AndroidTestFinder.containsAndroidTests(new File("target/test-classes/com/simpligility/maven/plugins/android/asm/withtests"));
40 Assert.assertTrue("'withtests' should contain tests.", result);
41 }
42
43 }