Search in sources :

Example 1 with RightsAgentStub

use of tryout.stub.RightsAgentStub in project dwoss by gg-net.

the class RightsManagmentControllerTest method testJavaFxFxml.

@Test
public void testJavaFxFxml() throws IOException {
    if (GraphicsEnvironment.isHeadless())
        return;
    // Implizit start of JavaFx.
    new JFXPanel();
    Dl.remote().add(RightsAgent.class, new RightsAgentStub());
    FXMLLoader loader = new FXMLLoader(RightsManagmentController.loadFxml());
    loader.load();
    assertThat((RightsManagmentController) loader.getController()).isNotNull();
}
Also used : JFXPanel(javafx.embed.swing.JFXPanel) RightsAgentStub(tryout.stub.RightsAgentStub) FXMLLoader(javafx.fxml.FXMLLoader) Test(org.junit.Test)

Example 2 with RightsAgentStub

use of tryout.stub.RightsAgentStub in project dwoss by gg-net.

the class RightsManagmentControllerTryout method main.

public static void main(String[] args) {
    Dl.remote().add(RightsAgent.class, new RightsAgentStub());
    UiCore.startSwing(() -> {
        JPanel main = new JPanel();
        main.add(new JButton(new RightsManagmentAction()));
        return main;
    });
}
Also used : JPanel(javax.swing.JPanel) RightsAgentStub(tryout.stub.RightsAgentStub) JButton(javax.swing.JButton) RightsManagmentAction(eu.ggnet.dwoss.rights.action.RightsManagmentAction)

Aggregations

RightsAgentStub (tryout.stub.RightsAgentStub)2 RightsManagmentAction (eu.ggnet.dwoss.rights.action.RightsManagmentAction)1 JFXPanel (javafx.embed.swing.JFXPanel)1 FXMLLoader (javafx.fxml.FXMLLoader)1 JButton (javax.swing.JButton)1 JPanel (javax.swing.JPanel)1 Test (org.junit.Test)1