Skip to content

Commit

Permalink
Updated unit-test-project based on 0.11 ml-unit-test release
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrudin committed May 22, 2018
1 parent ba91562 commit 7f32dce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 27 deletions.
16 changes: 6 additions & 10 deletions examples/unit-test-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,22 @@ include this by default (not every ml-gradle user will use ml-unit-test), so it

buildscript {
repositories {
jcenter()
maven {
url {"https://dl.bintray.com/rjrudin/maven/"}
}
jcenter()
}
dependencies {
classpath "com.marklogic:ml-unit-test-client:0.9.1"
classpath "com.marklogic:ml-unit-test-client:0.11"
}
}

Next, the ml-unit-test framework is depended on and installed as an "mlRestApi" dependency
Next, the ml-unit-test framework is depended on and installed as an "mlRestApi" dependency (the "mlRestApi" configuration
is a feature of ml-gradle for depending on packages of MarkLogic modules):

repositories {
maven {
url {"https://dl.bintray.com/rjrudin/maven/"}
}
jcenter()
}
dependencies {
mlRestApi "com.marklogic:ml-unit-test:0.9.1"
mlRestApi "com.marklogic:ml-unit-test-modules:0.11"
}

With those additions in place, the "mlUnitTest" task can be run. This task will use the value of mlTestRestPort to
Expand Down
16 changes: 2 additions & 14 deletions examples/unit-test-project/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
buildscript {
repositories {
jcenter()
mavenLocal()

// Needed for ml-unit-test-client dependency until it's available via jcenter()
maven {
url {"https://dl.bintray.com/rjrudin/maven/"}
}
}
dependencies {
classpath "com.marklogic:ml-unit-test-client:${mlUnitTestVersion}"
Expand All @@ -19,18 +13,12 @@ apply plugin: "com.marklogic.ml-gradle"

repositories {
jcenter()
mavenLocal()

// Needed for ml-unit-test and ml-unit-test-client dependencies until they're available via jcenter()
maven {
url {"https://dl.bintray.com/rjrudin/maven/"}
}
}

dependencies {
mlRestApi "com.marklogic:ml-unit-test:${mlUnitTestVersion}"
mlRestApi "com.marklogic:ml-unit-test-modules:${mlUnitTestVersion}"

// For running ml-unit-test tests via JUnit
testCompile "com.marklogic:ml-unit-test-client:${mlUnitTestVersion}"
testCompile "junit:junit:4+"
testCompile "junit:junit:4.12"
}
4 changes: 1 addition & 3 deletions examples/unit-test-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mlGradleVersion=3.6.3
mlUnitTestVersion=0.10.0
mlUnitTestVersion=0.11

mlHost=localhost
mlAppName=unit-test-example
Expand All @@ -12,8 +12,6 @@ mlTestRestPort=8135
mlUsername=admin
mlPassword=admin

mlContentForestsPerHost=1

# Test modules could be kept under src/main/ml-modules, but it's recommend to keep them in a separate directory so that
# the directory can be easily excluded by overriding this property
mlModulePaths=src/main/ml-modules,src/test/ml-modules

0 comments on commit 7f32dce

Please sign in to comment.