Mercurial > public > gradleplugins
annotate src/test/groovy/org/ssdt_ohio/gradle/plugins/UserDocPluginTest.groovy @ 18:4ff2030d2074
USASR-1921: Update VersionClassPlugin to allow buildscript to specify package in which to generate ProjectVersion.groovy file
author | Christopher Springer <springer@nwoca.org> |
---|---|
date | Thu, 07 Jan 2016 17:08:00 +0000 |
parents | a628135958e7 |
children | 927f02ccc596 |
rev | line source |
---|---|
13
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
1 /* |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
2 * Copyright (c) 2013. Ohio Department of Education. - All Rights Reserved. |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
3 * Unauthorized copying of this file, in any medium, is strictly prohibited. |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
4 * Written by State Software Development Team (http://ssdt.oecn.k12.oh.us/) |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
5 */ |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
6 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
7 package org.ssdt_ohio.gradle.plugins |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
8 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
9 import org.gradle.api.Project |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
10 import org.gradle.testfixtures.ProjectBuilder |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
11 import org.junit.Test |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
12 import org.ssdt_ohio.gradle.tasks.UserDoc |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
13 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
14 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
15 class UserDocPluginTest { |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
16 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
17 @Test |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
18 public void greeterPluginAddsGreetingTaskToProject() { |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
19 Project project = ProjectBuilder.builder().withProjectDir(new File('.')).build() |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
20 project.apply plugin: 'userdoc' |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
21 project.apply plugin: 'groovy' |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
22 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
23 project.dependencies { |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
24 compile localGroovy() |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
25 } |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
26 UserDoc task = project.tasks.userdoc |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
27 assert task instanceof UserDoc |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
28 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
29 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
30 task.generate() |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
31 |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
32 } |
a628135958e7
USASR-1307: inititial userdoc plugin/task to produce customizable groovy doc
Dave Smith <smith@nwoca.org>
parents:
diff
changeset
|
33 } |