Added spock framework
This commit is contained in:
parent
4109acfab7
commit
ced78faf6b
15
build.gradle
15
build.gradle
@ -8,10 +8,17 @@ group = 'com.fnecan.study'
|
|||||||
version = '0.0.1-SNAPSHOT'
|
version = '0.0.1-SNAPSHOT'
|
||||||
sourceCompatibility = '1.8'
|
sourceCompatibility = '1.8'
|
||||||
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: 'groovy'
|
||||||
|
|
||||||
|
sourceCompatibility = 1.8
|
||||||
|
targetCompatibility = 1.8
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
|
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||||
@ -20,6 +27,14 @@ dependencies {
|
|||||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||||
}
|
}
|
||||||
testImplementation 'org.springframework.security:spring-security-test'
|
testImplementation 'org.springframework.security:spring-security-test'
|
||||||
|
testCompile (
|
||||||
|
'org.codehaus.groovy:groovy-all:2.4.4',
|
||||||
|
'org.spockframework:spock-core:1.0-groovy-2.4'
|
||||||
|
)
|
||||||
|
|
||||||
|
testRuntime(
|
||||||
|
'com.athaydes:spock-reports:1.2.7'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
15
src/test/groovy/com/fnecan/study/bookapi/ExampleTest.groovy
Normal file
15
src/test/groovy/com/fnecan/study/bookapi/ExampleTest.groovy
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package com.fnecan.study.bookapi
|
||||||
|
|
||||||
|
import spock.lang.Specification
|
||||||
|
|
||||||
|
class ExampleTest extends Specification {
|
||||||
|
|
||||||
|
def "It should run the application" () {
|
||||||
|
when:
|
||||||
|
def a = 1;
|
||||||
|
|
||||||
|
then:
|
||||||
|
a == 1
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user