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
package test; | |
public class HellowWorld{ | |
public static void main(String[] args){ | |
System.out.println("Hello World"); | |
} | |
} |
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
(ns prime-factors | |
(:use clojure.test) | |
(:use clojure.contrib.generic.math-functions)) | |
(defn prime-factors | |
[n] | |
(loop [remainder n | |
result '() | |
factor 2] | |
(cond |
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
package introduction | |
import org.eclipse.xtext.xbase.lib.Procedures$Procedure1 | |
import static de.bmw.carit.jnario.common.test.util.ResultMatchers.* | |
import static de.bmw.carit.jnario.tests.util.SpecExecutor.* | |
import static org.hamcrest.CoreMatchers.* | |
import static org.junit.Assert.* | |
import static extension de.bmw.carit.jnario.common.test.util.Helpers.* |
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
package demo; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Suite; | |
import org.junit.runners.Suite.SuiteClasses; | |
@RunWith(Suite.class) | |
@SuiteClasses({EmptyStack.class, StackWithOneElement.class}) | |
public class StackTest { | |
} |
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
package json | |
import org.eclipse.xtext.xbase.lib.Pair | |
import java.util.List | |
import com.google.common.collect.Maps | |
class Json { | |
def static void main(String[] args) { | |
val json = map( |
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
package demo | |
import static org.mockito.Mockito.* | |
import static org.mockito.MockitoAnnotations.* | |
import java.util.List | |
import org.mockito.Mock | |
import org.jnario.runner.CreateWith | |
describe "Mockito"{ | |
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
<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.mycompany.app</groupId> | |
<artifactId>my-app</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>my-app</name> | |
<url>http://maven.apache.org</url> | |
<dependencies> |
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
<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.mycompany.app</groupId> | |
<artifactId>my-app</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>my-app</name> | |
<url>http://maven.apache.org</url> | |
<repositories> |
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
package example; | |
import org.jnario.lib.AbstractSpecCreator; | |
import org.jnario.runner.SpecCreator; | |
import org.springframework.test.context.TestContextManager; | |
public class SpringSupport extends AbstractSpecCreator{ | |
private TestContextManager testContextManager; | |
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
public static String convertToJavaString(String theString, boolean useUnicode) { | |
int len = theString.length(); | |
int bufLen = len * 2; | |
if (bufLen < 0) { | |
bufLen = Integer.MAX_VALUE; | |
} | |
StringBuffer outBuffer = new StringBuffer(bufLen); | |
for (int x = 0; x < len; x++) { | |
char aChar = theString.charAt(x); |
OlderNewer