public static Location location(final ClassName clazz, final MethodName method, final String methodDesc) { return new Location(clazz, method, methodDesc); }
@Override protected BlockCoverage mapToData(final Map<String, Object> map) { final String method = (String) map.get(METHOD); final Location location = new Location(ClassName.fromString((String) map.get(CLASSNAME)), MethodName.fromString(method.substring(0, method.indexOf(OPEN_PAREN))), method.substring(method.indexOf(OPEN_PAREN))); final BlockLocation blockLocation = new BlockLocation(location, Integer.parseInt((String) map.get(NUMBER))); @SuppressWarnings("unchecked") final Collection<String> tests = (Collection<String>) map.get(TESTS); return new BlockCoverage(blockLocation, tests); }
@Override protected MutationResult mapToData(final Map<String, Object> map) { final Location location = new Location(ClassName.fromString((String) map.get(MUTATED_CLASS)), MethodName.fromString((String) map.get(MUTATED_METHOD)), (String) map.get(METHOD_DESCRIPTION)); final MutationIdentifier id = new MutationIdentifier(location, Arrays.asList(new Integer((String) map.get(INDEX))), (String) map.get(MUTATOR)); final MutationDetails md = new MutationDetails(id, (String) map.get(SOURCE_FILE), (String) map.get(DESCRIPTION), Integer.parseInt((String) map.get(LINE_NUMBER)), Integer.parseInt((String) map.get(BLOCK))); final MutationStatusTestPair status = new MutationStatusTestPair(Integer.parseInt((String) map.get(NUMBER_OF_TESTS_RUN)), DetectionStatus.valueOf((String) map.get(STATUS)), (String) map.get(KILLING_TEST)); return new MutationResult(md, status); }
public static Location location(final ClassName clazz, final MethodName method, final String methodDesc) { return new Location(clazz, method, methodDesc); }
private MutationDetails getMutationDetails(Method method, MutationOperator operator, int start, int end) { Location location = new Location(className, MethodName.fromString(method.getName()), method.getDescriptor()); MutationIdentifier id = new MutationIdentifier( location, getIndexes(start, end), operator.getID()); return new MutationDetails(id, source, operator.getDescription(), start, 1); }