Class LightkeeperFrameworkAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<LightkeeperFrameworkAssert,@Nullable ILightkeeperFramework>
nl.pim16aap2.lightkeeper.framework.assertions.LightkeeperFrameworkAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<LightkeeperFrameworkAssert,,ILightkeeperFramework> org.assertj.core.api.Descriptable<LightkeeperFrameworkAssert>,org.assertj.core.api.ExtensionPoints<LightkeeperFrameworkAssert,ILightkeeperFramework>
public final class LightkeeperFrameworkAssert
extends org.assertj.core.api.AbstractAssert<LightkeeperFrameworkAssert,@Nullable ILightkeeperFramework>
Assertions for framework-level runtime state.
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
info, throwUnsupportedExceptionOnEquals -
Method Summary
Modifier and TypeMethodDescriptionAsserts that no error-severity server errors were captured.hasNoServerErrors(Predicate<ServerErrorSnapshot> allowedErrors) Asserts that no error-severity server errors were captured, ignoring entries matched by the allowlist.isPaper()Asserts that the server is running on Paper.isSpigot()Asserts that the server is running on Spigot.server()Navigates to eager assertions over the framework's live server.org.assertj.core.api.ListAssert<String> Returns an AssertJ list assertion over captured server output.Methods inherited from class org.assertj.core.api.AbstractAssert
actual, asInstanceOf, asList, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Method Details
-
server
Navigates to eager assertions over the framework's live server.- Returns:
- Server assertions, including named plugin assertions.
-
serverOutput
Returns an AssertJ list assertion over captured server output.- Returns:
- AssertJ list assertion for captured server output lines.
-
isPaper
Asserts that the server is running on Paper.- Returns:
- This assertion for fluent chaining.
-
isSpigot
Asserts that the server is running on Spigot.- Returns:
- This assertion for fluent chaining.
-
hasNoServerErrors
Asserts that no error-severity server errors were captured.Backed by structured capture (see
IServerControl.errors()): entries are matched on their captured severity, not on console-line substrings, so a log message merely containing the word "exception" no longer trips this assertion. Warnings are never counted.- Returns:
- This assertion for fluent chaining.
-
hasNoServerErrors
Asserts that no error-severity server errors were captured, ignoring entries matched by the allowlist.Use the allowlist for known-benign errors, matching on structured fields rather than console text:
assertThat(framework).hasNoServerErrors(error -> error.loggerName().equals("net.minecraft.server") && error.message().contains("moving_piston"));- Parameters:
allowedErrors- Predicate matching captured errors that should not fail this assertion.- Returns:
- This assertion for fluent chaining.
-