mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 23:11:52 +08:00
feat: support deserialize packer (but only CB4)
This commit is contained in:
+27
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user