I was looking through junit ExpectedExceptions ' javadoc , and I can't figure out where startsWith is startsWith in their example (marked HERE in the code). I checked the CoreMatcher utility class , but could not find the static startsWith method.
Where is this method located?
(I obviously can write it myself, but itβs not)
public static class HasExpectedException { @Rule public ExpectedException thrown = ExpectedException.none(); @Test public void throwsNullPointerExceptionWithMessage() { thrown.expect(NullPointerException.class); thrown.expectMessage("happened?"); thrown.expectMessage(startsWith("What"));
assylias
source share