Collection notypeoccrs = notypes.getNoTypeOccurrences(); Collection notypeassocs = notypes.getNoTypeAssociations();
public void testNoTypeCount() { NoTypeCount test = new NoTypeCount(tm); test.traverse(); //Type checking. assertTrue("check type (getNoTypeTopics)", test.getNoTypeTopics() instanceof Collection); // note: comparing with previous version: // +1 because names must have a type since 5.1.0 and this type topic has no type assertEquals(11, test.getNoTypeTopics().size()); assertTrue("check type (getNoTypeAssociations)", test.getNoTypeAssociations() instanceof Collection); assertEquals(0, test.getNoTypeAssociations().size()); assertTrue("check type (getNoTypeOccurrences)", test.getNoTypeOccurrences() instanceof Collection); assertEquals(0, test.getNoTypeOccurrences().size()); //set test.tm = null test = new NoTypeCount(null); try { test.traverse(); fail("Should raise a NullPointerException"); } catch (NullPointerException e) { //Test succesfull } }