tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1357934 - in /openejb/trunk/openejb/examples: ./ cucumber-jvm/ cucumber-jvm/src/ cucumber-jvm/src/main/ cucumber-jvm/src/main/java/ cucumber-jvm/src/main/java/org/ cucumber-jvm/src/main/java/org/superbiz/ cucumber-jvm/src/main/java/org/sup...
Date Thu, 05 Jul 2012 21:26:19 GMT
Author: rmannibucau
Date: Thu Jul  5 21:26:18 2012
New Revision: 1357934

URL: http://svn.apache.org/viewvc?rev=1357934&view=rev
Log:
OPENEJB-1859 cucumber-jvm sample

Added:
    openejb/trunk/openejb/examples/cucumber-jvm/
    openejb/trunk/openejb/examples/cucumber-jvm/pom.xml
    openejb/trunk/openejb/examples/cucumber-jvm/src/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/superbiz/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/superbiz/cucumber/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/superbiz/cucumber/Hello.java
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/META-INF/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/META-INF/beans.xml
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/superbiz/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/superbiz/cucumber/
    openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/superbiz/cucumber/hello.feature
    openejb/trunk/openejb/examples/cucumber-jvm/src/test/
    openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/
    openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/
    openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/
    openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/
    openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/CucumberTest.java
    openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/HelloStepDef.java
Modified:
    openejb/trunk/openejb/examples/pom.xml

Added: openejb/trunk/openejb/examples/cucumber-jvm/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/cucumber-jvm/pom.xml?rev=1357934&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/cucumber-jvm/pom.xml (added)
+++ openejb/trunk/openejb/examples/cucumber-jvm/pom.xml Thu Jul  5 21:26:18 2012
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.superbiz</groupId>
+  <artifactId>cucumber-jvm</artifactId>
+  <packaging>jar</packaging>
+  <version>1.1-SNAPSHOT</version>
+  <name>OpenEJB :: Examples :: Cucumber JVM</name>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <id>apache-m2-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+    </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>6.0-4</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+    </dependency>
+    <!-- The <scope>test</scope> guarantees that none of your runtime code

+      is dependent on any OpenEJB classes. -->
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>4.1.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>info.cukes</groupId>
+      <artifactId>cucumber-openejb</artifactId>
+      <version>1.0.10</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>info.cukes</groupId>
+      <artifactId>cucumber-junit</artifactId>
+      <version>1.0.10</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency> <!-- needed by last released versino of cucumber-openejb -->
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.16</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <!-- This section allows you to configure where to publish libraries for
+    sharing. It is not required and may be deleted. For more information see:
+    http://maven.apache.org/plugins/maven-deploy-plugin/ -->
+  <distributionManagement>
+    <repository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/repo/</url>
+    </repository>
+    <snapshotRepository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/snapshot-repo/</url>
+    </snapshotRepository>
+  </distributionManagement>
+
+</project>
+

Added: openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/superbiz/cucumber/Hello.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/superbiz/cucumber/Hello.java?rev=1357934&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/superbiz/cucumber/Hello.java
(added)
+++ openejb/trunk/openejb/examples/cucumber-jvm/src/main/java/org/superbiz/cucumber/Hello.java
Thu Jul  5 21:26:18 2012
@@ -0,0 +1,7 @@
+package org.superbiz.cucumber;
+
+public class Hello {
+    public String hello(final String name) {
+        return "hello " + name;
+    }
+}

Added: openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/META-INF/beans.xml?rev=1357934&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/META-INF/beans.xml (added)
+++ openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/META-INF/beans.xml Thu
Jul  5 21:26:18 2012
@@ -0,0 +1,18 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans />

Added: openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/superbiz/cucumber/hello.feature
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/superbiz/cucumber/hello.feature?rev=1357934&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/superbiz/cucumber/hello.feature
(added)
+++ openejb/trunk/openejb/examples/cucumber-jvm/src/main/resources/org/superbiz/cucumber/hello.feature
Thu Jul  5 21:26:18 2012
@@ -0,0 +1,5 @@
+Feature: Hello
+
+  Scenario: Say Hello
+    Given A name 'foo'
+    Then The bean says 'hello foo'

Added: openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/CucumberTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/CucumberTest.java?rev=1357934&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/CucumberTest.java
(added)
+++ openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/CucumberTest.java
Thu Jul  5 21:26:18 2012
@@ -0,0 +1,9 @@
+package org.superbiz.cucumber;
+
+import cucumber.junit.Cucumber;
+import org.junit.runner.RunWith;
+
+@RunWith(Cucumber.class)
+public class CucumberTest {
+    // the suite, will load automatically the features
+}

Added: openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/HelloStepDef.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/HelloStepDef.java?rev=1357934&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/HelloStepDef.java
(added)
+++ openejb/trunk/openejb/examples/cucumber-jvm/src/test/java/org/superbiz/cucumber/HelloStepDef.java
Thu Jul  5 21:26:18 2012
@@ -0,0 +1,25 @@
+package org.superbiz.cucumber;
+
+import cucumber.annotation.en.Given;
+import cucumber.annotation.en.Then;
+
+import javax.inject.Inject;
+
+import static org.junit.Assert.assertEquals;
+
+public class HelloStepDef {
+    @Inject
+    private Hello hello;
+
+    private String name;
+
+    @Given("^A name '([a-z]*)'$")
+    public void initName(final String name) {
+        this.name = name;
+    }
+
+    @Then("^The bean says '([ a-z]*)'$")
+    public void checkResult(final String result) {
+        assertEquals(result, hello.hello(name));
+    }
+}

Modified: openejb/trunk/openejb/examples/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/pom.xml?rev=1357934&r1=1357933&r2=1357934&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/pom.xml (original)
+++ openejb/trunk/openejb/examples/pom.xml Thu Jul  5 21:26:18 2012
@@ -48,6 +48,7 @@
     <module>cdi-produces-field</module>
     <module>cdi-query</module>
     <module>component-interfaces</module>
+    <module>cucumber-jvm</module>
     <module>custom-injection</module>
     <module>datasource-ciphered-password</module>
     <module>datasource-definition</module>



Mime
View raw message