-
Notifications
You must be signed in to change notification settings - Fork 0
AlignmentAlgorithm MatchingByRendering test
I tested MatchingByRendering algorithm.
The first half of the test is creating an Engine. Add to alignment algorithms the MatchingByRendering algorithm.The engine holds the algohitms in a set so i iterate in this set. I added only one algorhtim, so the only element of this should be MatchingByRendering algorithm. The following test checks the algorhitm parameters like its name, its priority and aggressiveness.
assertFalse(algorithm.isCustom());
int expectedPrior = PrioritizedComparator.MAX_PRIORITY - 1;
assertEquals(expectedPrior,algorithm.getPriority());
assertEquals(AlignmentAggressiveness.MODERATE,algorithm.getAggressiveness());
String expectedName = "Match By Rendering";
assertEquals(expectedName,algorithm.getAlgorithmName());
I load MatchByRendering ontology, wich i created for this test.
The algorhitm should find for every entity a matching entity. So the second part of test is checking that. First i get the differnce map and than i get the unmatched source entities which should be an empty set.
With this test i increased the codecoverage in MatchingByRendering.java from 0.0% to 88.7%.