feat: support deserialize packer (but only CB4)

This commit is contained in:
ReaJason
2024-12-10 21:07:41 +08:00
parent 60345851f5
commit 5e0b47956d
37 changed files with 690 additions and 62 deletions
@@ -0,0 +1,27 @@
package com.reajason.javaweb.integration;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;
public class DoesNotContainExceptionMatcher extends TypeSafeMatcher<String> {
@Override
protected boolean matchesSafely(String logs) {
return !logs.contains("Exception");
}
@Override
public void describeTo(Description description) {
description.appendText("logs without exceptions");
}
@Override
protected void describeMismatchSafely(String logs, Description mismatchDescription) {
mismatchDescription.appendText("found logs containing exceptions:\n")
.appendText(logs.replaceAll("(?m)^", " "));
}
public static DoesNotContainExceptionMatcher doesNotContainException() {
return new DoesNotContainExceptionMatcher();
}
}