blob: b7fa449251132200a20bb371e0059a5c2e77a345 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package org.onap.cps.ncmp.api.impl.utils.context
import com.fasterxml.jackson.databind.ObjectMapper
import org.onap.cps.utils.JsonObjectMapper
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ContextConfiguration
import spock.lang.Specification;
@SpringBootTest(classes = [ObjectMapper, JsonObjectMapper])
@ContextConfiguration(classes = [CpsApplicationContext.class])
class CpsApplicationContextSpec extends Specification {
def 'Verify if cps application context contains a requested bean.'() {
when: 'cps bean is requested from application context'
def jsonObjectMapper = CpsApplicationContext.getCpsBean(JsonObjectMapper.class)
then: 'requested bean of JsonObjectMapper is not null'
assert jsonObjectMapper != null
}
}
|