Class FakeClient

java.lang.Object
com.valhalla.sdk.testing.FakeClient

public final class FakeClient extends Object
Instance-based offline model of the session facts exposed by Client.

It intentionally does not replace the static native Client facade. Pass it to extracted decision code in JVM tests.

  • Constructor Details

    • FakeClient

      public FakeClient()
  • Method Details

    • isLoggedIn

      public boolean isLoggedIn()
      Returns whether the fake session is logged in.
    • loggedIn

      public FakeClient loggedIn(boolean value)
      Sets fake login state.
    • isActionReady

      public boolean isActionReady()
      Returns whether the fake runtime accepts actions.
    • actionReady

      public FakeClient actionReady(boolean value)
      Sets fake action readiness.
    • capabilities

      public Set<String> capabilities()
      Returns immutable advertised fake capabilities.
    • support

      public FakeClient support(String capability)
      Adds one advertised fake capability.
    • withdrawSupport

      public FakeClient withdrawSupport(String capability)
      Removes one advertised fake capability.
    • supports

      public boolean supports(String capability)
      Tests one fake capability.
    • varp

      public FakeClient varp(int id, int value)
      Defines one fake client varp.
    • getVarp

      public OptionalInt getVarp(int id)
      Reads one fake client varp.
    • sceneBase

      public Tile sceneBase()
      Returns the fake southwest scene base.
    • sceneBase

      public FakeClient sceneBase(Tile value)
      Sets the fake southwest scene base.
    • isTileLoaded

      public boolean isTileLoaded(Tile tile)
      Tests whether a tile belongs to the fake 104x104 loaded scene.