Cross Reference:
xref
: /
ontohub
/
test
/
unit
/
ontology_import_xml_test.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
ontology_import_xml_test.rb revision 2e4d9c9f0e084f77648c6df1bb4b936334fc8fb5
require
'test_helper'
class
OntologyImportXMLTest
<
ActiveSupport
::
TestCase
def
fixture_file
(
name
)
Rails.root
+
'
test
/
fixtures
/
ontologies
/'
+
name
end
context
'Import valid Ontology'
do
setup
do
@
ontology
=
Factory
:
ontology
@
ontology.import
_xml_from_file
fixture_file
(
'
valid.xml
'
)
end
should
'save logic'
do
assert_equal
'OWL'
, @
ontology.logic.name
end
context
'entity count'
do
should
'be correct'
do
count
= @
ontology.entities.count
assert_equal
5
,
count
assert_equal
count
, @
ontology.entities
_count
end
end
context
'axiom count'
do
should
'be correct'
do
count
= @
ontology.axioms.count
assert_equal
1
,
count
assert_equal
count
, @
ontology.axioms
_count
end
end
end
end