use of com.redhat.cloud.policies.app.model.Policy in project policies-ui-backend by RedHatInsights.
the class FullTriggerHandlingTest method testActionUpdate4.
@Test
void testActionUpdate4() {
Policy p = createPolicy();
p.actions = "notification";
FullTrigger ft = new FullTrigger(p);
p.actions = null;
ft.updateFromPolicy(p);
assertEquals(0, ft.trigger.actions.size());
}
use of com.redhat.cloud.policies.app.model.Policy in project policies-ui-backend by RedHatInsights.
the class FullTriggerHandlingTest method testNameUpdate.
@Test
void testNameUpdate() {
Policy p = createPolicy();
FullTrigger ft = new FullTrigger(p);
p.name = p.name + "-2";
ft.updateFromPolicy(p);
assertEquals("hula-2", ft.trigger.name);
}
use of com.redhat.cloud.policies.app.model.Policy in project policies-ui-backend by RedHatInsights.
the class FullTriggerHandlingTest method testActionWithParam.
@Test
void testActionWithParam() {
Policy p = createPolicy();
p.actions = "notification maybe-param";
FullTrigger ft = new FullTrigger(p);
assertEquals(1, ft.trigger.actions.size());
}
use of com.redhat.cloud.policies.app.model.Policy in project policies-ui-backend by RedHatInsights.
the class FullTriggerHandlingTest method testDescriptionUpdate.
@Test
void testDescriptionUpdate() {
Policy p = createPolicy();
FullTrigger ft = new FullTrigger(p);
p.description = p.description + "-2";
ft.updateFromPolicy(p);
assertEquals("some text-2", ft.trigger.description);
}
use of com.redhat.cloud.policies.app.model.Policy in project policies-ui-backend by RedHatInsights.
the class FullTriggerHandlingTest method testEnabledUpdate.
@Test
void testEnabledUpdate() {
Policy p = createPolicy();
FullTrigger ft = new FullTrigger(p);
p.isEnabled = true;
ft.updateFromPolicy(p);
assertTrue(ft.trigger.enabled);
}
Aggregations