1 package net.jaekl.cfb.xml;
3 import static org.junit.Assert.*;
5 import net.jaekl.cfb.store.Location;
9 public class BugInstanceTest {
12 public void testGetPrincipalLocation() {
16 // Location(Long id, String className, String methodName, String methodRole, Integer startLine, Integer endLine)
19 new Location( 1L, "ClassOne", "methodOne", "METHOD_CALLED", 1, 12),
20 new Location( 2L, "ClassTwo", "methodTwo", "", 23, 34)
24 new Location( 2L, "ClassTwo", "methodTwo", "", 23, 34)
39 new Location( 3L, "ClassThree", "methodThree", null, 34, 45),
40 new Location( 4L, "ClassFour", "methodFour", null, 45, 56),
41 new Location( 5L, "ClassFive", "methodFive", null, 56, 67)
45 new Location( 3L, "ClassThree", "methodThree", null, 34, 45),
51 new Location( 6L, "CLassSix", "methodSix", "METHOD_CALLED", 67, 78)
60 for (Location[][] datum : data) {
61 Location[] input = datum[0];
62 Location expected = datum[1][0];
64 BugInstance bug = new BugInstance(
71 Location actual = bug.getPrincipalLocation();
73 assertEquals(expected, actual);