Skip to content

Commit bf5e3e9

Browse files
committed
Basic scala module for testing
1 parent 88aa19b commit bf5e3e9

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed

tests/build.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* This build file was auto generated by running the Gradle 'init' task
3+
* by 'MarkPerry' at '12/12/13 10:02 AM' with Gradle 1.9
4+
*
5+
* This generated file contains a sample Scala library project to get you started.
6+
* For more details take a look at the Scala plugin chapter in the Gradle
7+
* user guide available at http://gradle.org/docs/1.9/userguide/scala_plugin.html
8+
*/
9+
10+
// Apply the scala plugin to add support for Scala
11+
apply plugin: 'scala'
12+
13+
// In this section you declare where to find the dependencies of your project
14+
repositories {
15+
// Use 'maven central' for resolving your dependencies.
16+
// You can declare any Maven/Ivy/file repository here.
17+
mavenCentral()
18+
}
19+
20+
// In this section you declare the dependencies for your production and test code
21+
dependencies {
22+
// We use the latest 2.10 scala version in our library project
23+
compile 'org.scala-lang:scala-library:2.10.3'
24+
25+
// We use the latest version of the scalatest for testing our library
26+
testCompile 'junit:junit:4.11'
27+
testCompile 'org.scalatest:scalatest_2.10:1.9.2'
28+
}

tests/settings.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* This settings file was auto generated by the Gradle buildInit task
3+
* by 'MarkPerry' at '12/12/13 10:02 AM' with Gradle 1.9
4+
*
5+
* The settings file is used to specify which projects to include in your build.
6+
* In a single project build this file can be empty or even removed.
7+
*
8+
* Detailed information about configuring a multi-project build in Gradle can be found
9+
* in the user guide at http://gradle.org/docs/1.9/userguide/multi_project_builds.html
10+
*/
11+
12+
/*
13+
// To declare projects as part of a multi-project build use the 'include' method
14+
include 'shared'
15+
include 'api'
16+
include 'services:webservice'
17+
*/
18+
19+
rootProject.name = 'tests'

tests/src/main/scala/Library.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* This Scala source file was auto generated by running 'gradle buildInit --type scala-library'
3+
* by 'MarkPerry' at '12/12/13 10:02 AM' with Gradle 1.9
4+
*
5+
* @author MarkPerry, @date 12/12/13 10:02 AM
6+
*/
7+
class Library {
8+
def someLibraryMethod(): Boolean = true
9+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* This Scala Testsuite was auto generated by running 'gradle init --type scala-library'
3+
* by 'MarkPerry' at '12/12/13 10:02 AM' with Gradle 1.9
4+
*
5+
* @author MarkPerry, @date 12/12/13 10:02 AM
6+
*/
7+
8+
import org.scalatest.FunSuite
9+
import org.junit.runner.RunWith
10+
import org.scalatest.junit.JUnitRunner
11+
12+
@RunWith(classOf[JUnitRunner])
13+
class LibrarySuite extends FunSuite {
14+
test("someLibraryMethod is always true") {
15+
def library = new Library()
16+
assert(library.someLibraryMethod)
17+
}
18+
}

0 commit comments

Comments
 (0)