-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce tck assertion mapper integration
- Loading branch information
Showing
11 changed files
with
729 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<parent> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-spec</artifactId> | ||
<version>1.2</version> | ||
</parent> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.jboss.cdi.tck</groupId> | ||
<artifactId>cdi-tck-mapper</artifactId> | ||
<version>1.0.0.Alpha1</version> | ||
|
||
<properties> | ||
<jsoup.version>1.8.1</jsoup.version> | ||
<path.to.cdi.spec>spec/jcp/target/publish/html/cdi-spec.html</path.to.cdi.spec> | ||
<tck.version>1.2.3.Final</tck.version> | ||
<tck.audit.url>https://repo1.maven.org/maven2/org/jboss/cdi/tck/cdi-tck-impl/${tck.version}/cdi-tck-impl-${tck.version}-audit-cdi.xml</tck.audit.url> | ||
<tck.coverage.url>https://repo1.maven.org/maven2/org/jboss/cdi/tck/cdi-tck-impl/${tck.version}/cdi-tck-impl-${tck.version}-coverage-cdi.html</tck.coverage.url> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<!-- jsoup HTML parser library @ http://jsoup.org/ --> | ||
<groupId>org.jsoup</groupId> | ||
<artifactId>jsoup</artifactId> | ||
<version>${jsoup.version}</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
|
||
<build> | ||
<finalName>tck-mapper</finalName> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>2.5</version> | ||
<configuration> | ||
<archive> | ||
<compress>true</compress> | ||
<manifest> | ||
<mainClass>org.jboss.cdi.tck.mapper.Mapper</mainClass> | ||
<!--classpathPrefix>META-INF/lib/</classpathPrefix--> | ||
<addClasspath>true</addClasspath> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<!--plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.7</version> | ||
<executions> | ||
<execution> | ||
<id>copy-resources</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>../spec/jcp/target/publish/html/images</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources/images/</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>1.3.2</version> | ||
<executions> | ||
<execution> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>java</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<mainClass>org.jboss.cdi.tck.mapper.Mapper</mainClass> | ||
<includeProjectDependencies>true</includeProjectDependencies> | ||
<arguments> | ||
<argument>${tck.audit.url}</argument> | ||
<argument>${tck.coverage.url}</argument> | ||
<argument>${path.to.cdi.spec}</argument> | ||
<argument>${tck.version}</argument> | ||
</arguments> | ||
</configuration> | ||
</plugin--> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
|
||
<profile> | ||
<id>tck-assertions</id> | ||
<activation> | ||
<property> | ||
<name>tck</name> | ||
</property> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.7</version> | ||
<executions> | ||
<execution> | ||
<id>copy-resources</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>../spec/jcp/target/publish/html/images</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources/images/</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>1.3.2</version> | ||
<executions> | ||
<execution> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>java</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<mainClass>org.jboss.cdi.tck.mapper.Mapper</mainClass> | ||
<includeProjectDependencies>true</includeProjectDependencies> | ||
<arguments> | ||
<argument>${tck.audit.url}</argument> | ||
<argument>${tck.coverage.url}</argument> | ||
<argument>${path.to.cdi.spec}</argument> | ||
<argument>${tck.version}</argument> | ||
</arguments> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
|
||
</project> |
62 changes: 62 additions & 0 deletions
62
tck-mapper/src/main/java/org/jboss/cdi/tck/audit/Assertion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package org.jboss.cdi.tck.audit; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Tomas Remes | ||
*/ | ||
public class Assertion extends SectionElement { | ||
|
||
private String id = ""; | ||
private String note; | ||
private boolean testable = true; | ||
private Group group; | ||
private List<Test> tests; | ||
|
||
public Assertion() { | ||
this.tests = new ArrayList<>(); | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
public List<Test> getTests() { | ||
return tests; | ||
} | ||
|
||
public boolean isTestable() { | ||
return testable; | ||
} | ||
|
||
public void setTestable(boolean testable) { | ||
this.testable = testable; | ||
} | ||
|
||
public String getNote() { | ||
return note; | ||
} | ||
|
||
public void setNote(String note) { | ||
this.note = note; | ||
} | ||
|
||
public Group getGroup() { | ||
return group; | ||
} | ||
|
||
public void setGroup(Group group) { | ||
this.group = group; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return this.getId() + " " + this.getText(); | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
tck-mapper/src/main/java/org/jboss/cdi/tck/audit/Group.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.jboss.cdi.tck.audit; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Tomas Remes | ||
*/ | ||
public class Group extends SectionElement { | ||
|
||
|
||
private List<Assertion> assertions; | ||
|
||
public Group(){ | ||
this.assertions = new ArrayList<>(); | ||
} | ||
|
||
public List<Assertion> getAssertions() { | ||
return assertions; | ||
} | ||
|
||
|
||
|
||
|
||
} |
54 changes: 54 additions & 0 deletions
54
tck-mapper/src/main/java/org/jboss/cdi/tck/audit/Section.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package org.jboss.cdi.tck.audit; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Tomas Remes | ||
*/ | ||
public class Section { | ||
|
||
private String id; | ||
private String title; | ||
private int level; | ||
|
||
public List<SectionElement> getSectionElements() { | ||
return sectionElements; | ||
} | ||
|
||
private List<SectionElement> sectionElements; | ||
|
||
public Section() { | ||
this.sectionElements = new ArrayList<>(); | ||
} | ||
|
||
public int getLevel() { | ||
return level; | ||
} | ||
|
||
public void setLevel(int level) { | ||
this.level = level; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return this.getId() + " " + this.getTitle() + " " + this.getLevel(); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
tck-mapper/src/main/java/org/jboss/cdi/tck/audit/SectionElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.jboss.cdi.tck.audit; | ||
|
||
/** | ||
* @author Tomas Remes | ||
*/ | ||
public class SectionElement { | ||
|
||
private String text; | ||
|
||
public String getText() { | ||
return text; | ||
} | ||
|
||
public void setText(String text) { | ||
this.text = text; | ||
} | ||
} |
Oops, something went wrong.