Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Suderman committed Mar 13, 2019
1 parent bed6599 commit a9f3772
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 104 deletions.
40 changes: 40 additions & 0 deletions src/test/groovy/org/anc/lapps/vocab/dsl/VocabDslTest.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,47 @@
/*
* Copyright (c) 2019 The American National Corpus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.anc.lapps.vocab.dsl

import org.junit.Ignore
import org.junit.Test

/**
*
*/
@Ignore
class VocabDslTest {

@Test
void generateTTL() {
String[] args = "-r ttl src/test/resources/lapps.vocab".split()
VocabDsl.main(args)
}

@Test
void generateExampleVocabulary() {
['ttl', 'owl', 'rdf', 'jsonld'].each { String format ->
String[] args = "-r $format src/test/resources/example.vocabulary".split()
VocabDsl.main(args)
}
}

@Test
void generateExampleTTL() {
String[] args = "-r ttl src/test/resources/example.vocabulary".split()
VocabDsl.main(args)
}
}
26 changes: 26 additions & 0 deletions src/test/resources/example.vocabulary
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version = '1.0.0'

Thing {
definition "The most generic type."
//properties {
// id { type 'xsd:string'; description: 'Everything has an ID.' }
//}
}

Animal {
definition "Living things"
parent 'Thing'
}

Person {
definition "People"
parent 'Animal'
}
/*
Person {
definition "People"
parent 'Animal'
}
*/


Loading

0 comments on commit a9f3772

Please sign in to comment.