Skip to content

Commit

Permalink
Continue to address issue #175 by adding archetype integration tests …
Browse files Browse the repository at this point in the history
…that make sure that the Grader javadoc is generated as expected.
  • Loading branch information
DavidWhitlock committed Jun 25, 2017
1 parent 28d5ce7 commit 2928338
Show file tree
Hide file tree
Showing 46 changed files with 264 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gwt-parent/gwt-originals-parent/airline-gwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
3 changes: 3 additions & 0 deletions gwt-parent/gwt-originals-parent/apptbook-gwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
3 changes: 3 additions & 0 deletions gwt-parent/gwt-originals-parent/phonebill-gwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "The main class for the CS410J airline Project"
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "A basic GWT class that makes sure that we can send an airline back"
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "A helper class for accessing the rest client."
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package projects.javadoc

File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "The main class for the CS410J appointment book Project"
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "A basic GWT class that makes sure that we can send an appointment book"
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "A helper class for accessing the rest client"
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "A basic GWT class that makes sure that we can send an Phone Bill back"
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "A helper class for accessing the rest client."
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,33 @@
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<configuration>
<doclet>edu.pdx.cs410J.grader.APIDocumentationDoclet</doclet>
<docletArtifact>
<groupId>edu.pdx.cs410J</groupId>
<artifactId>grader</artifactId>
<version>Summer2017</version>
</docletArtifact>
<useStandardDocletOptions>false</useStandardDocletOptions>
<show>private</show>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package=it.pkg.javadoc
version=0.1-SNAPSHOT
groupId=javadoc.archetype.it
artifactId=javadoc
grader=true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
javadoc:javadoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
File buildLog = new File(basedir, "project/javadoc/build.log");
if (!buildLog.isFile()) {
throw new FileNotFoundException("Couldn't find build log: " + buildLog)
}

String logText = buildLog.text

def expectedJavaDoc = "This class is represents a <code>Student</code>."
if (!logText.contains(expectedJavaDoc)) {
throw new IllegalStateException("Didn't find expected JavaDoc: " + expectedJavaDoc)
}
3 changes: 3 additions & 0 deletions projects-parent/originals-parent/airline-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
3 changes: 3 additions & 0 deletions projects-parent/originals-parent/airline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
3 changes: 3 additions & 0 deletions projects-parent/originals-parent/apptbook-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
3 changes: 3 additions & 0 deletions projects-parent/originals-parent/apptbook/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
3 changes: 3 additions & 0 deletions projects-parent/originals-parent/phonebill-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
3 changes: 3 additions & 0 deletions projects-parent/originals-parent/phonebill/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
<profiles>
<profile>
<id>grader</id>
<activation>
<activeByDefault>${grader}</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
Expand Down
Loading

0 comments on commit 2928338

Please sign in to comment.