@Test public void dispose() { final ReplicantRuntime runtime = Replicant.context().getRuntime(); safeAction( () -> assertEquals( runtime.getConnectors().size(), 0 ) ); final SystemSchema schema = newSchema(); final Connector connector = createConnector( schema ); safeAction( () -> assertEquals( runtime.getConnectors().size(), 1 ) ); assertTrue( connector.getReplicantContext().getSchemaService().getSchemas().contains( schema ) ); Disposable.dispose( connector ); safeAction( () -> assertEquals( runtime.getConnectors().size(), 0 ) ); assertFalse( connector.getReplicantContext().getSchemaService().getSchemas().contains( schema ) ); }
@ContextRef @Nonnull abstract ArezContext context();
Connector extends ReplicantService { @ContextRef @Nonnull abstract ArezContext context(); }
Connector extends ReplicantService { @ContextRef @Nonnull abstract ArezContext context(); Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); }
Connector extends ReplicantService { @ContextRef @Nonnull abstract ArezContext context(); Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString(); }
Connector extends ReplicantService { @ContextRef @Nonnull abstract ArezContext context(); Connector( @Nullable final ReplicantContext context,
             @Nonnull final SystemSchema schema,
             @Nonnull final Transport transport ); @Override String toString();  }