Permalink
Browse files

Fixed tests application and added a testcase

  • Loading branch information...
1 parent 6e1cb6e commit 21fa12d2c1db1895a54a68895462c464a6352707 @robink robink committed Apr 9, 2010
View
@@ -1,4 +1,4 @@
-Copyright 2009 Robin Komiwes, Bruno Verachten, Christophe Cordenier
+Copyright 2010 Robin Komiwes, Bruno Verachten, Christophe Cordenier
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
View
@@ -1 +1 @@
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>com.spreadthesource</groupId> <artifactId>tapestry5-rome</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Spread The Source - Tapestry 5 Rome</name> <parent> <groupId>com.spreadthesource</groupId> <artifactId>parent-pom</artifactId> <version>1.2</version> </parent> <dependencies> <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-core</artifactId> <version>${tapestry-release-version}</version> </dependency> <!-- A dependency on either JUnit or TestNG is required, or the surefire plugin (which runs the tests) will fail, preventing Maven from packaging the WAR. Tapestry includes a large number of testing facilities designed for use with TestNG (http://testng.org/), so it's recommended. --> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.8</version> <classifier>jdk15</classifier> <scope>test</scope> </dependency> <dependency> <groupId>org.easymock</groupId> <artifactId>easymock</artifactId> <version>2.4</version> <scope>test</scope> </dependency> <!-- tapestry-test will conflict with RunJettyRun inside Eclipse. tapestry-test brings in Selenium, which is based on Jetty 5.1; RunJettyRun uses Jetty 6. <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-test</artifactId> <version>${tapestry-release-version}</version> <scope>test</scope> </dependency> --> <!-- Provided by the servlet container, but sometimes referenced in the application code. --> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>rome</groupId> <artifactId>rome</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <finalName>tapestry5-rome</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifestEntries> <Tapestry-Module-Classes>com.spreadthesource.tapestry.rome.services.RomeModule </Tapestry-Module-Classes> </manifestEntries> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <optimize>true</optimize> </configuration> </plugin> <!-- Run the application using "mvn jetty:run" --> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.9</version> <configuration> <requestLog implementation="org.mortbay.jetty.NCSARequestLog"> <append>true</append> </requestLog> <useTestClasspath>true</useTestClasspath> <webAppSourceDirectory>src/test/webapp</webAppSourceDirectory> </configuration> </plugin> <plugin> <groupId>com.mycila.maven-license-plugin</groupId> <artifactId>maven-license-plugin</artifactId> <version>1.5.1</version> <configuration> <header>LICENSE.txt</header> <excludes> <exclude>**/*.sql</exclude> <exclude>**/*.txt</exclude> <exclude>**/PLACEHOLDER</exclude> <exclude>**/*.properties</exclude> <exclude>**/web.xml</exclude> <exclude>**/*.apt</exclude> <exclude>**/*.tml</exclude> <exclude>**/.*</exclude> <exclude>**/*.ent</exclude> <exclude>**/*.xsl</exclude> <exclude>**/*.xml</exclude> <exclude>**/*.html</exclude> <exclude>**/*.dtd</exclude> <exclude>src/test/conf/**</exclude> </excludes> <useDefaultExcludes>true</useDefaultExcludes> <mapping> <java>DOUBLESLASH_STYLE</java> </mapping> <useDefaultMapping>true</useDefaultMapping> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build> <reporting> <!-- Adds a report detailing the components, mixins and base classes defined by this module. --> <plugins> <plugin> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-component-report</artifactId> <version>${tapestry-release-version}</version> <configuration> <rootPackage>com.spreadthesource.tapestry.rome</rootPackage> </configuration> </plugin> </plugins> </reporting> <repositories> <repository> <id>apache</id> <url>https://repository.apache.org/content/repositories/releases</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>apache-snapshots</id> <url>https://repository.apache.org/content/repositories/snapshots</url> <releases> <enabled>false</enabled> </releases> </repository> <repository> <id>devlab722-repo</id> <url>http://nexus.devlab722.net/nexus/content/repositories/releases </url> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>devlab722-snapshot-repo</id> <url>http://nexus.devlab722.net/nexus/content/repositories/snapshots </url> <releases> <enabled>false</enabled> </releases> </repository> <repository> <id>codehaus.snapshots</id> <url>http://snapshots.repository.codehaus.org</url> </repository> <repository> <id>java.net</id> <url>http://download.java.net/maven/2/</url> </repository> <repository> <id>OpenQA_Release</id> <name>OpenQA Release Repository</name> <url>http://archiva.openqa.org/repository/releases/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>mc-release</id> <name>Local Maven repository of releases</name> <url>http://mc-repo.googlecode.com/svn/maven2/releases</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </pluginRepository> </pluginRepositories> <properties> <tapestry-release-version>5.1.0.5</tapestry-release-version> </properties></project>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>com.spreadthesource</groupId> <artifactId>tapestry5-rome</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Spread The Source - Tapestry 5 Rome</name> <parent> <groupId>com.spreadthesource</groupId> <artifactId>parent-pom</artifactId> <version>1.2</version> </parent> <dependencies> <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-core</artifactId> <version>${tapestry-release-version}</version> </dependency> <dependency> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-test</artifactId> <version>${tapestry-release-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.11</version> <classifier>jdk15</classifier> <scope>test</scope> </dependency> <!-- Provided by the servlet container, but sometimes referenced in the application code. --> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>rome</groupId> <artifactId>rome</artifactId> <version>1.0</version> </dependency> </dependencies> <build> <finalName>tapestry5-rome</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifestEntries> <Tapestry-Module-Classes>com.spreadthesource.tapestry.rome.services.RomeModule </Tapestry-Module-Classes> </manifestEntries> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <optimize>true</optimize> </configuration> </plugin> <!-- Run the application using "mvn jetty:run" --> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.9</version> <configuration> <requestLog implementation="org.mortbay.jetty.NCSARequestLog"> <append>true</append> </requestLog> <useTestClasspath>true</useTestClasspath> <webAppSourceDirectory>src/test/webapp</webAppSourceDirectory> </configuration> </plugin> <plugin> <groupId>com.mycila.maven-license-plugin</groupId> <artifactId>maven-license-plugin</artifactId> <version>1.5.1</version> <configuration> <header>LICENSE.txt</header> <excludes> <exclude>**/*.sql</exclude> <exclude>**/*.txt</exclude> <exclude>**/PLACEHOLDER</exclude> <exclude>**/*.properties</exclude> <exclude>**/web.xml</exclude> <exclude>**/*.apt</exclude> <exclude>**/*.tml</exclude> <exclude>**/.*</exclude> <exclude>**/*.ent</exclude> <exclude>**/*.xsl</exclude> <exclude>**/*.xml</exclude> <exclude>**/*.html</exclude> <exclude>**/*.dtd</exclude> <exclude>src/test/conf/**</exclude> </excludes> <useDefaultExcludes>true</useDefaultExcludes> <mapping> <java>DOUBLESLASH_STYLE</java> </mapping> <useDefaultMapping>true</useDefaultMapping> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build> <reporting> <!-- Adds a report detailing the components, mixins and base classes defined by this module. --> <plugins> <plugin> <groupId>org.apache.tapestry</groupId> <artifactId>tapestry-component-report</artifactId> <version>${tapestry-release-version}</version> <configuration> <rootPackage>com.spreadthesource.tapestry.rome</rootPackage> </configuration> </plugin> </plugins> </reporting> <repositories> <repository> <id>apache</id> <url>https://repository.apache.org/content/repositories/releases</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>apache-snapshots</id> <url>https://repository.apache.org/content/repositories/snapshots</url> <releases> <enabled>false</enabled> </releases> </repository> <repository> <id>devlab722-repo</id> <url>http://nexus.devlab722.net/nexus/content/repositories/releases </url> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>devlab722-snapshot-repo</id> <url>http://nexus.devlab722.net/nexus/content/repositories/snapshots </url> <releases> <enabled>false</enabled> </releases> </repository> <repository> <id>codehaus.snapshots</id> <url>http://snapshots.repository.codehaus.org</url> </repository> <repository> <id>java.net</id> <url>http://download.java.net/maven/2/</url> </repository> <repository> <id>OpenQA_Release</id> <name>OpenQA Release Repository</name> <url>http://archiva.openqa.org/repository/releases/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>mc-release</id> <name>Local Maven repository of releases</name> <url>http://mc-repo.googlecode.com/svn/maven2/releases</url> <snapshots> <enabled>false</enabled> </snapshots> <releases> <enabled>true</enabled> </releases> </pluginRepository> </pluginRepositories> <properties> <tapestry-release-version>5.2.0-SNAPSHOT</tapestry-release-version> </properties></project>
@@ -1,5 +1,5 @@
//
-// Copyright 2009 Robin Komiwes, Bruno Verachten, Christophe Cordenier
+// Copyright 2010 Robin Komiwes, Bruno Verachten, Christophe Cordenier
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
//
-// Copyright 2009 Robin Komiwes, Bruno Verachten, Christophe Cordenier
+// Copyright 2010 Robin Komiwes, Bruno Verachten, Christophe Cordenier
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,8 +1,14 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="tapestry-rome Application Test Suite" annotations="1.5">
- <test name="Unit Tests">
- <packages>
- <package name="com.spreadthesource.tapestry.rome"/>
- </packages>
- </test>
+<suite name="tapestry5-rome Application Test Suite" annotations="1.5" verbose="2">
+ <test name="Integration Tests" enabled="true">
+ <parameter name="tapestry.web-app-folder" value="src/test/webapp"/>
+
+ <packages>
+ <package name="com.spreadthesource.tapestry.rome.integration" />
+ </packages>
+
+ <classes>
+ <class name="org.apache.tapestry5.test.SeleniumLauncher" />
+ </classes>
+ </test>
</suite>
@@ -0,0 +1,16 @@
+package com.spreadthesource.tapestry.rome.integration;
+
+
+import org.apache.tapestry5.test.SeleniumTestCase;
+import org.testng.annotations.Test;
+
+public class RomeTest extends SeleniumTestCase
+{
+ @Test
+ public void lala()
+ {
+ open("index");
+
+ // System.out.println(getText("//html"));
+ }
+}
@@ -1,5 +1,5 @@
//
-// Copyright 2009 Robin Komiwes, Bruno Verachten, Christophe Cordenier
+// Copyright 2010 Robin Komiwes, Bruno Verachten, Christophe Cordenier
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
//
-// Copyright 2009 Robin Komiwes, Bruno Verachten, Christophe Cordenier
+// Copyright 2010 Robin Komiwes, Bruno Verachten, Christophe Cordenier
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -32,6 +32,6 @@ public static void contributeApplicationDefaults(
MappedConfiguration<String, String> configuration) {
configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
configuration.add(SymbolConstants.APPLICATION_VERSION, "1.0-SNAPSHOT");
- configuration.add(SymbolConstants.PRODUCTION_MODE,"false");
+ //configuration.add(SymbolConstants.PRODUCTION_MODE,"false");
}
}
@@ -1,9 +1,10 @@
-<html title="tapestry-jquery Index"
+<html title="tapestry5-rome Index"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
xmlns:p="tapestry:parameter">
<!-- Most of the page content, including <head>, <body>, etc. tags, comes from Layout.tml -->
-<p>Hello!</p>
-
+<p>Hello!
+<t:eventlink id="atom" t:event="atom">Atom</t:eventlink><br /> <t:eventlink id="rss" t:event="rss">RSS</t:eventlink>
+</p>
</html>

0 comments on commit 21fa12d

Please sign in to comment.