use of org.jboss.hal.ballroom.form.StateMachine in project console by hal.
the class ModelNodeFormTest method defaultStateMachine.
@Test
public void defaultStateMachine() {
StateMachine stateMachine = new ModelNodeForm.Builder("defaultStateMachine", metadata(new ResourceDescriptionBuilder().attributes())).stateMachine();
Assert.assertTrue(stateMachine instanceof ExistingStateMachine);
}
use of org.jboss.hal.ballroom.form.StateMachine in project console by hal.
the class ModelNodeFormTest method createResourceStateMachine.
// ------------------------------------------------------ verify different state machines
@Test
public void createResourceStateMachine() {
StateMachine stateMachine = new ModelNodeForm.Builder("createResourceStateMachine", metadata(new ResourceDescriptionBuilder().requestProperties(Collections.emptyMap()))).fromRequestProperties().stateMachine();
Assert.assertTrue(stateMachine instanceof AddOnlyStateMachine);
}
use of org.jboss.hal.ballroom.form.StateMachine in project console by hal.
the class ModelNodeFormTest method editOnlyStateMachine.
@Test
public void editOnlyStateMachine() {
StateMachine stateMachine = new ModelNodeForm.Builder("editOnlyStateMachine", metadata(new ResourceDescriptionBuilder().attributes())).fromRequestProperties().stateMachine();
Assert.assertTrue(stateMachine instanceof AddOnlyStateMachine);
}
use of org.jboss.hal.ballroom.form.StateMachine in project console by hal.
the class ModelNodeFormTest method viewOnlyStateMachine.
@Test
public void viewOnlyStateMachine() {
StateMachine stateMachine = new ModelNodeForm.Builder("viewOnlyStateMachine", metadata(new ResourceDescriptionBuilder().attributes())).readOnly().stateMachine();
Assert.assertTrue(stateMachine instanceof ReadOnlyStateMachine);
}
Aggregations