-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
The regex fix in the class MatrixHttpContent, we've talked about yesterday, is also included. |
@@ -45,7 +45,7 @@ | |||
|
|||
private Logger log = LoggerFactory.getLogger(MatrixHttpContent.class); | |||
|
|||
private final Pattern filenamePattern = Pattern.compile("filename=\"?(?<filename>.+)\"?;?"); | |||
private final Pattern filenamePattern = Pattern.compile("filename=\"?(?<filename>.+[^\";])"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the pattern be filename=\"?(?<filename>[^\";]+)
instead?
public class MatrixHttpContentTest extends MatrixHttpTest { | ||
private URI address = new URI("mxc://localhost/testAddress.txt"); | ||
|
||
public MatrixHttpContentTest() throws URISyntaxException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left over code?
// checkErrorInfo403(e); | ||
return; | ||
} | ||
fail("In this case, an exception has to be thrown."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use @Test(expected = ....)
// checkErrorInfo429(e); | ||
return; | ||
} | ||
fail("In this case, an exception has to be thrown."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use @test(expected = ....)
checkErrorInfo403(e); | ||
return; | ||
} | ||
fail("In this case, an exception has to be thrown."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go after createRoomObject()...
in the try {}
.
createRoomObject().getTopic(); | ||
} catch (MatrixClientRequestException e) { | ||
checkErrorInfo403(e); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed if we refactor the fail()
(see next comment)
I've added test cases, which cover most of the http calls of the classes, which extend from AMatrixHttpClient.
Could you please have a look at it and tell me, if this can be merged or if I should make some adjustments, first?