Additional validation for names/identifiers
[cps.git] / cps-ncmp-service / src / test / groovy / org / onap / cps / ncmp / api / models / YangResourceTest.groovy
1 package org.onap.cps.ncmp.api.models
2
3 import spock.lang.Specification
4
5 class YangResourceSpec extends Specification {
6
7     YangResource objectUnderTest = new YangResource(moduleName: 'module name',
8                                                     revision:'revision',
9                                                     yangSource:'source')
10
11     def 'Yang resource attributes'() {
12         expect: 'correct module name'
13             objectUnderTest.moduleName == 'module name'
14         and: 'correct revision (this property is not used in production code, hence the need for this test)'
15             objectUnderTest.revision == 'revision'
16         and: 'correct yang source'
17             objectUnderTest.yangSource == 'source'
18     }
19
20 }