@Test void testCanUpcastReturnsFalseForIncorrectRevision() { EventData<?> testEventData = new TestEventEntry(EXPECTED_PAYLOAD_TYPE, "some-non-matching-revision"); IntermediateEventRepresentation testRepresentation = new InitialEventRepresentation(testEventData, serializer); assertFalse(testSubject.canUpcast(testRepresentation)); }
@Override protected boolean canUpcast(IntermediateEventRepresentation intermediateRepresentation) { SerializedType serializedType = intermediateRepresentation.getType(); return isExpectedPayloadType(serializedType.getName()) && isExpectedRevision(serializedType.getRevision()); }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected boolean canUpcast(IntermediateEventRepresentation intermediateRepresentation) { SerializedType serializedType = intermediateRepresentation.getType(); return isExpectedPayloadType(serializedType.getName()) && isExpectedRevision(serializedType.getRevision()); } }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected boolean canUpcast(IntermediateEventRepresentation intermediateRepresentation) { SerializedType serializedType = intermediateRepresentation.getType(); return isExpectedPayloadType(serializedType.getName()) && isExpectedRevision(serializedType.getRevision()); } EventTypeUpcaster(String expectedPayloadType,
                             String expectedRevision,
                             String upcastedPayloadType,
                             String upcastedRevision); }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected boolean canUpcast(IntermediateEventRepresentation intermediateRepresentation) { SerializedType serializedType = intermediateRepresentation.getType(); return isExpectedPayloadType(serializedType.getName()) && isExpectedRevision(serializedType.getRevision()); } EventTypeUpcaster(String expectedPayloadType,
                             String expectedRevision,
                             String upcastedPayloadType,
                             String upcastedRevision); static Builder from(Class<?> payloadType, String revision); static Builder from(String payloadType, String revision); }
EventTypeUpcaster extends SingleEventUpcaster { @Override protected boolean canUpcast(IntermediateEventRepresentation intermediateRepresentation) { SerializedType serializedType = intermediateRepresentation.getType(); return isExpectedPayloadType(serializedType.getName()) && isExpectedRevision(serializedType.getRevision()); } EventTypeUpcaster(String expectedPayloadType,
                             String expectedRevision,
                             String upcastedPayloadType,
                             String upcastedRevision); static Builder from(Class<?> payloadType, String revision); static Builder from(String payloadType, String revision);  }