Skip to content

Unit test to the Engine

reischlb edited this page May 4, 2017 · 1 revision

I made some unit test, mainly to the Engine class in this pull.

The test are the following:

testInitialiseIdentifySplitConcepts_NotInitalisedEngine

This one cheks what happens if we try to initialze IdentifySplitConcepts algorithms with a not initilaized engine. We well get a NullPointerException.

testEnginePresentAlgorithmsSortand testEngineAlignmentAlgorithmsSort

This two cheks if the sorting of the algorithms is Engine works perfectly or not. These are working OK.

testTryToAddOnePresentAlgorithmMuchTimeToAnEngine and testTryToAddOneAlignAlgorithmMuchTimeToAnEngine

This two cheks wheter you can add one algorithm more then one time to the engine, or not. And you can do this, and its bad, because this algorithms take a lot of time to run.

testEngineGetOwlDiffMap

This one tests what happen, if we construct an engine, and then we want to get the difference between the two given ontology. Unfortunately we get a NullPointerException if we do not call Engine.phase1(). I think it would be better, if this (and maybe phase2() too) are called in the constructor. (And if they get a much speaker name, that would be very good.)

testEnginePhaseMethods

This one tests what happen if you call on an Engine phase2 before phase1. We get a NullPointerException. It could be logical not to call phase2 before phase1 becaouse of the names, altough it needs exception handling.