AssertionError on wrong delimiter

I Tried to test cases were the dilimiter was incomplete but i got these error messages:

---> test prog2.tests.daily.TestsCorrect::all
Result: failure
Additional info:
java.lang.AssertionError: The following test cases fail on a correct implementation:
        uri.tests.SimpleTests.testMissingDelimiter2(SimpleTests.java:73): AssertionError: first delimiter incomplete, so no URI should be returned expected null, but was:<prog2.uri.ref.ComposableParser@186dac97>
        uri.tests.SimpleTests.testMissingDelimiter1(SimpleTests.java:68): AssertionError: first delimiter incomplete, so no URI should be returned expected null, but was:<prog2.uri.ref.ComposableParser@73e7db24>

for reference the testet uris where “scheme:/youtube.com” and “scheme//youtube.com” . I Thought that a wrong first delimiter should result in a returned null for the URI. Am I reading the error message wrong or did I make another mistake?

Edit: figured it out myself. I forgot to put .parse() after the creation for anyone who got the same error .

1 Like