Added spock framework
This commit is contained in:
parent
4109acfab7
commit
ced78faf6b
17
build.gradle
17
build.gradle
|
@ -8,10 +8,17 @@ group = 'com.fnecan.study'
|
|||
version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = '1.8'
|
||||
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
apply plugin: 'groovy'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||
|
@ -20,8 +27,16 @@ dependencies {
|
|||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
}
|
||||
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 {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
|
@ -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