private static OpenDolphinFactory createServerDolphinFactory(
      final TestInMemoryConfiguration config) {
    Assert.requireNonNull(config, "config");
    return new OpenDolphinFactory() {

      @Override
      public DefaultServerDolphin create() {
        DefaultServerDolphin defaultServerDolphin = config.getServerDolphin();
        return defaultServerDolphin;
      }
    };
  }
 public DolphinTestContext(
     DolphinPlatformConfiguration configuration,
     DolphinSessionProvider dolphinSessionProvider,
     ContainerManager containerManager,
     ControllerRepository controllerRepository,
     TestInMemoryConfiguration config) {
   super(
       configuration,
       dolphinSessionProvider,
       containerManager,
       controllerRepository,
       createServerDolphinFactory(config),
       createEmptyCallback(),
       createEmptyCallback());
   this.config = Assert.requireNonNull(config, "config");
   DolphinContextUtils.setContextForCurrentThread(this);
 }
Пример #3
0
 /**
  * Constructor
  *
  * @param viewBinder the viewBinder
  */
 public DolphinWindow(final AbstractViewBinder<M> viewBinder) {
   Assert.requireNonNull(viewBinder, "viewBinder");
   DolphinWindowUtils.destroyOnClose(this, viewBinder);
   setScene(new Scene(viewBinder.getParent()));
 }