Search in sources :

Example 11 with Event

use of com.google.recaptchaenterprise.v1beta1.Event in project requery by requery.

the class UpsertTest method testUpsertManyToMany.

@Test
public void testUpsertManyToMany() {
    Event event1 = new Event();
    event1.setId(UUID.randomUUID());
    Tag tag = new Tag();
    tag.setId(UUID.randomUUID());
    tag.getEvents().add(event1);
    data.upsert(tag);
    Event event2 = new Event();
    event2.setId(UUID.randomUUID());
    tag.getEvents().add(event2);
    data.upsert(event2);
    data.upsert(tag);
}
Also used : Event(io.requery.test.model3.Event) Tag(io.requery.test.model3.Tag) Test(org.junit.Test)

Example 12 with Event

use of com.google.recaptchaenterprise.v1beta1.Event in project requery by requery.

the class UpsertTest method testUpsertInsert.

@Test
public void testUpsertInsert() {
    Event event = new Event();
    UUID id = UUID.randomUUID();
    event.setId(id);
    event.setName("test");
    data.upsert(event);
    Event found = data.findByKey(Event.class, id);
    assertEquals(event.getId(), found.getId());
}
Also used : Event(io.requery.test.model3.Event) UUID(java.util.UUID) Test(org.junit.Test)

Example 13 with Event

use of com.google.recaptchaenterprise.v1beta1.Event in project kie-wb-common by kiegroup.

the class BaseEventPropertyReaderTest method testSLADueDate.

@Test
public void testSLADueDate() {
    List<ExtensionAttributeValue> extensionValues = mockExtensionValues(DroolsPackage.Literals.DOCUMENT_ROOT__META_DATA, SLADUEDATE_ELEMENT_NAME, SLADUEDATE);
    Event eventMock = getCurrentEventMock();
    when(eventMock.getExtensionValues()).thenReturn(extensionValues);
    assertEquals(SLADUEDATE, propertyReader.getSlaDueDate());
}
Also used : Event(org.eclipse.bpmn2.Event) ExtensionAttributeValue(org.eclipse.bpmn2.ExtensionAttributeValue) Test(org.junit.Test)

Example 14 with Event

use of com.google.recaptchaenterprise.v1beta1.Event in project kie-wb-common by kiegroup.

the class BaseEventPropertyReaderTest method testGetSignalScope.

@Test
public void testGetSignalScope() {
    List<ExtensionAttributeValue> extensionValues = mockExtensionValues(DroolsPackage.Literals.DOCUMENT_ROOT__META_DATA, SCOPE_ELEMENT_NAME, SCOPE);
    Event eventMock = getCurrentEventMock();
    when(eventMock.getExtensionValues()).thenReturn(extensionValues);
    assertEquals(SCOPE, propertyReader.getSignalScope());
}
Also used : Event(org.eclipse.bpmn2.Event) ExtensionAttributeValue(org.eclipse.bpmn2.ExtensionAttributeValue) Test(org.junit.Test)

Example 15 with Event

use of com.google.recaptchaenterprise.v1beta1.Event in project kie-wb-common by kiegroup.

the class IntermediateCatchEventConverterTest method setUp.

@Before
public void setUp() {
    Event boundaryEvent = bpmn2.createBoundaryEvent();
    boundaryEventPropertyWriter = spy(new BoundaryEventPropertyWriter((BoundaryEvent) spy(boundaryEvent), new FlatVariableScope(), new HashSet<>()));
    // when(boundaryEventPropertyWriter.getFlowElement()).thenReturn(spy(FlowElement.class));
    Event catchEvent = bpmn2.createIntermediateCatchEvent();
    catchEventPropertyWriter = spy(new CatchEventPropertyWriter((CatchEvent) spy(catchEvent), new FlatVariableScope(), new HashSet<>()));
    propertyWriterFactory = spy(PropertyWriterFactory.class);
    when(propertyWriterFactory.of(any(BoundaryEvent.class))).thenReturn(boundaryEventPropertyWriter);
    when(propertyWriterFactory.of(any(CatchEvent.class))).thenReturn(catchEventPropertyWriter);
    generalSet = new BPMNGeneralSet(NAME, DOCUMENTATION);
    assignmentsInfo = new AssignmentsInfo(ASSIGNMENTS_INFO);
    dataIOSet = new DataIOSet(assignmentsInfo);
    advancedData = new AdvancedData();
    slaDueDate = mock(SLADueDate.class);
    errorRef = mock(ErrorRef.class);
    signalRef = mock(SignalRef.class);
    linkRef = mock(LinkRef.class);
    timerSettingsValue = mock(TimerSettingsValue.class);
    timerSettings = new TimerSettings(timerSettingsValue);
    messageRef = mock(MessageRef.class);
    scriptTypeValue = mock(ScriptTypeValue.class);
    conditionExpression = new ConditionExpression(scriptTypeValue);
    escalationRef = mock(EscalationRef.class);
    tested = spy(new IntermediateCatchEventConverter(propertyWriterFactory));
}
Also used : SignalRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.signal.SignalRef) TimerSettings(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettings) BoundaryEvent(org.eclipse.bpmn2.BoundaryEvent) TimerSettingsValue(org.kie.workbench.common.stunner.bpmn.definition.property.event.timer.TimerSettingsValue) AssignmentsInfo(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.AssignmentsInfo) MessageRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.message.MessageRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CatchEvent(org.eclipse.bpmn2.CatchEvent) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent) PropertyWriterFactory(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.PropertyWriterFactory) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) CatchEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter) ConditionExpression(org.kie.workbench.common.stunner.bpmn.definition.property.common.ConditionExpression) IntermediateCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent) BaseCatchingIntermediateEvent(org.kie.workbench.common.stunner.bpmn.definition.BaseCatchingIntermediateEvent) Event(org.eclipse.bpmn2.Event) IntermediateTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent) CatchEvent(org.eclipse.bpmn2.CatchEvent) BoundaryEvent(org.eclipse.bpmn2.BoundaryEvent) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) IntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) FlatVariableScope(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.FlatVariableScope) ErrorRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.error.ErrorRef) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) BoundaryEventPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.BoundaryEventPropertyWriter) LinkRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkRef) ScriptTypeValue(org.kie.workbench.common.stunner.bpmn.definition.property.task.ScriptTypeValue) Before(org.junit.Before)

Aggregations

Test (org.junit.Test)18 Event (io.requery.test.model3.Event)9 UUID (java.util.UUID)9 Event (org.apache.skywalking.apm.network.event.v3.Event)9 Test (org.junit.jupiter.api.Test)9 Event (org.eclipse.bpmn2.Event)5 Event (com.google.cloud.video.livestream.v1.Event)4 LivestreamServiceClient (com.google.cloud.video.livestream.v1.LivestreamServiceClient)4 Place (io.requery.test.model3.Place)4 Tag (io.requery.test.model3.Tag)4 AlarmMessage (org.apache.skywalking.oap.server.core.alarm.AlarmMessage)4 ListNamespacedEvent (com.marcnuri.yakc.api.events.v1.EventsV1Api.ListNamespacedEvent)3 Event (com.marcnuri.yakc.model.io.k8s.api.events.v1.Event)3 Event (io.fabric8.kubernetes.api.model.events.v1.Event)3 Event (io.requery.test.model2.Event)3 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 Event (uk.gov.justice.hmpps.prison.api.model.v1.Event)3 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 JsonArray (com.google.gson.JsonArray)2