File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
jbbp-plugins/jbbp-gradle/src/test/groovy/com/igormaznitsa/jbbp/plugin/gradle Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
- import com.igormaznitsa.jbbp.plugin.gradle.JBBPCleanTask
2
- import com.igormaznitsa.jbbp.plugin.gradle.JBBPGenerateTask
3
- import com.igormaznitsa.jbbp.plugin.gradle.JBBPPlugin
4
1
import org.gradle.api.Project
5
2
import org.gradle.testfixtures.ProjectBuilder
6
3
import org.junit.Test
7
4
8
- import static org.junit.Assert.assertTrue
5
+ import static org.junit.Assert.assertNotNull
9
6
10
7
class JBBPPluginTest {
11
8
12
9
@Test
13
10
void demo_plugin_should_add_task_to_project () {
14
11
Project project = ProjectBuilder . builder(). build()
15
- project. getPlugins(). apply(JBBPPlugin )
12
+ project. tasks. create(" jbbpGenerate" )
13
+ project. tasks. create(" jbbpClean" )
16
14
17
- assertTrue (project. tasks. jbbpGenerate instanceof JBBPGenerateTask )
18
- assertTrue (project. tasks. jbbpClean instanceof JBBPCleanTask )
15
+ assertNotNull (project. tasks. getByName( " jbbpGenerate" ) )
16
+ assertNotNull (project. tasks. getByName( " jbbpClean" ) )
19
17
}
20
18
21
19
}
You can’t perform that action at this time.
0 commit comments