Skip to content

Commit

Permalink
Handle Exception.class match in assertThrows
Browse files Browse the repository at this point in the history
zalando/problem@1b987b8
problem/src/test/java/org/zalando/problem/GenericProblemsTest.java
  • Loading branch information
tsantalis committed Jan 17, 2025
1 parent 9b2cc97 commit c33a4aa
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3572,6 +3572,15 @@ public void computeRefactoringsWithinBody() throws RefactoringMinerTimedOutExcep
}
}
}
if(nonMappedLeavesT2.isEmpty()) {
AbstractCodeMapping firstMapping = set.iterator().next();
List<LeafExpression> leafExpressions = firstMapping.getFragment2().findExpression(expectedException.getString());
if(leafExpressions.size() == 1) {
LeafMapping leafMapping = new LeafMapping(expectedException, leafExpressions.get(0), operation1, operation2);
ref.addSubExpressionMapping(leafMapping);
break;
}
}
}
}
}
Expand Down

0 comments on commit c33a4aa

Please sign in to comment.