Class ServerControlAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<ServerControlAssert,@Nullable IServerControl>
nl.pim16aap2.lightkeeper.framework.assertions.ServerControlAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<ServerControlAssert,IServerControl>, org.assertj.core.api.Descriptable<ServerControlAssert>, org.assertj.core.api.ExtensionPoints<ServerControlAssert,IServerControl>

public final class ServerControlAssert extends org.assertj.core.api.AbstractAssert<ServerControlAssert,@Nullable IServerControl>
Eager assertions over live server observations.

Each assertion reads current state. Use LightkeeperAssertions.eventually(java.time.Duration, nl.pim16aap2.lightkeeper.framework.assertions.LightkeeperAssertions.RetryingAssertion) for explicit retries.

  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    info, throwUnsupportedExceptionOnEquals
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Asserts that no error-severity server entries have been captured.
    Asserts that no error-severity entries remain after applying an allowlist.
    Asserts that the server runs on Paper.
    Asserts that the server runs on Spigot.
    org.assertj.core.api.ListAssert<String>
    Returns ordinary list assertions over the output captured at this navigation call.
    plugin(String pluginName)
    Selects a plugin for live presence, enabled-state, and version assertions without querying the server yet.

    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, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, as, as, describedAs, describedAs
  • Method Details

    • errors

      public ServerErrorsAssert errors()
      Returns:
      Live structured error/warning assertions, without consuming or clearing entries.
    • plugin

      public ServerPluginAssert plugin(String pluginName)
      Selects a plugin for live presence, enabled-state, and version assertions without querying the server yet.
      Parameters:
      pluginName - Plugin name from its plugin.yml; must not be blank.
      Returns:
      Plugin assertions that re-query the named plugin on each evaluation.
    • isPaper

      public ServerControlAssert isPaper()
      Asserts that the server runs on Paper.
      Returns:
      This assertion for fluent chaining.
    • isSpigot

      public ServerControlAssert isSpigot()
      Asserts that the server runs on Spigot.
      Returns:
      This assertion for fluent chaining.
    • output

      public org.assertj.core.api.ListAssert<String> output()
      Returns ordinary list assertions over the output captured at this navigation call.

      Recreate this navigation inside an eventually callback to observe new output.

      Returns:
      Assertions over the captured output lines.
    • hasNoErrors

      public ServerControlAssert hasNoErrors()
      Asserts that no error-severity server entries have been captured. Warnings are ignored.
      Returns:
      This assertion for fluent chaining.
    • hasNoErrors

      public ServerControlAssert hasNoErrors(Predicate<ServerErrorSnapshot> allowedErrors)
      Asserts that no error-severity entries remain after applying an allowlist.
      Parameters:
      allowedErrors - Predicate matching known-benign captured errors to ignore.
      Returns:
      This assertion for fluent chaining.