From f0207c6e5847453764f5a94579779faebfdfcec3 Mon Sep 17 00:00:00 2001 From: Jim Balhoff Date: Sun, 17 Nov 2024 20:03:14 -0500 Subject: [PATCH] Add another small test. --- .../geneontology/owl/differ/TestDiff.scala | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/test/scala/org/geneontology/owl/differ/TestDiff.scala diff --git a/src/test/scala/org/geneontology/owl/differ/TestDiff.scala b/src/test/scala/org/geneontology/owl/differ/TestDiff.scala new file mode 100644 index 0000000..6f340bd --- /dev/null +++ b/src/test/scala/org/geneontology/owl/differ/TestDiff.scala @@ -0,0 +1,22 @@ +package org.geneontology.owl.differ + +import org.semanticweb.owlapi.apibinding.OWLManager +import utest._ + +import java.io.File + +object TestDiff extends TestSuite { + + val tests: Tests = Tests { + val left = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(new File("src/test/resources/left-1.ofn")) + val right = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(new File("src/test/resources/right-1.ofn")) + test("Number of changed axioms and groups") { + val diff = Differ.diff(left, right) + assert(diff.left.axioms.size == 3) + assert(diff.right.axioms.size == 8) + val grouped = Differ.groupedDiff(diff) + assert(grouped.groups.size == 4) + } + } + +}