Permalink
Browse files

Initial checkin

  • Loading branch information...
0 parents commit 04803ce95b8e91389a916424ba12ea7315b4e309 Andrey Paramonov committed Jul 18, 2009
@@ -0,0 +1,4 @@
+/.classpath
+/.project
+/.settings
+/target
53 pom.xml
@@ -0,0 +1,53 @@
+<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>com.ndpar</groupId>
+ <artifactId>groovy-testing</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0-rc-5</version>
+ <configuration>
+ <providerSelection>1.6</providerSelection>
+ <debug>false</debug>
+ <verbose>true</verbose>
+ <stacktrace>true</stacktrace>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.6</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>1.6.3</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
@@ -0,0 +1,8 @@
+package com.ndpar.gtesting;
+
+public class App {
+
+ public int getNumber() {
+ return 5;
+ }
+}
@@ -0,0 +1,19 @@
+package com.ndpar.gtesting
+
+import static org.junit.Assert.assertEquals
+
+import org.junit.Before
+import org.junit.Test
+
+class SimpleJUnit4Test {
+
+ private App app
+
+ @Before void setUp() {
+ app = new App()
+ }
+
+ @Test void number_returns_correct_value() {
+ assertEquals 5, app.number
+ }
+}
@@ -0,0 +1,21 @@
+package com.ndpar.gtesting;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class AppTest {
+
+ private App app;
+
+ @Before
+ public void setUp() {
+ app = new App();
+ }
+
+ @Test
+ public void getNumber_returns_5() {
+ assertEquals(5, app.getNumber());
+ }
+}

0 comments on commit 04803ce

Please sign in to comment.