Commit 1db2235d authored by Harshitha Sai Muppala's avatar Harshitha Sai Muppala

Added the spock tests for the service layer

parent fd01c49a
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.2'
id 'io.spring.dependency-management' version '1.1.2'
id 'groovy'
id 'jacoco'
}
group = 'com.example.ordermangement'
......@@ -26,10 +27,29 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-webflux'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.projectreactor:reactor-test'
// testImplementation 'org.codehaus.groovy:groovy-all:3.0.8'
//// https://mvnrepository.com/artifact/org.spockframework/spock-spring
// testImplementation 'org.spockframework:spock-spring:2.4-M1-groovy-3.0'
// mandatory dependencies for using Spock
implementation 'org.codehaus.groovy:groovy:3.0.10'
testImplementation platform("org.spockframework:spock-bom:2.1-groovy-3.0")
testImplementation "org.spockframework:spock-core"
// dependencies used by examples in this project
implementation "org.codehaus.groovy:groovy-sql:3.0.9"
}
tasks.named('test') {
useJUnitPlatform()
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
package com.example.ordermangement.order_management;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class OrderManagementApplicationTests {
@Test
void contextLoads() {
}
}
//package com.example.ordermangement.order_management;
//
//import org.junit.jupiter.api.Test;
//
//import spock.lang.Specification;
//
//@SpringBootTest
//class OrderManagementApplicationTests extends Specification {
//
// @Test
// void contextLoads() {
// }
//
//}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment