summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/models/YangResourceTest.groovy
blob: 0a0c84e2562aa2b465a7c65923621fe6e06bd7b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package org.onap.cps.ncmp.api.models

import spock.lang.Specification

class YangResourceSpec extends Specification {

    YangResource objectUnderTest = new YangResource(moduleName: 'module name',
                                                    revision:'revision',
                                                    yangSource:'source')

    def 'Yang resource attributes'() {
        expect: 'correct module name'
            objectUnderTest.moduleName == 'module name'
        and: 'correct revision (this property is not used in production code, hence the need for this test)'
            objectUnderTest.revision == 'revision'
        and: 'correct yang source'
            objectUnderTest.yangSource == 'source'
    }

}