use of io.spine.test.aggregate.ProjectId in project core-java by SpineEventEngine.
the class SubscriptionRecordShould method fail_to_match_improper_target.
@Test
public void fail_to_match_improper_target() {
final ProjectId nonExistingId = ProjectId.newBuilder().setId("never-existed").build();
final SubscriptionRecord notMatchingRecord = new SubscriptionRecord(Given.subscription(), Given.target(nonExistingId), Given.TYPE);
final Project entityState = Project.getDefaultInstance();
final Any wrappedState = AnyPacker.pack(entityState);
final ProjectId redundantId = ProjectId.getDefaultInstance();
final boolean matchResult = notMatchingRecord.matches(Given.TYPE, redundantId, wrappedState);
assertFalse(matchResult);
}
Aggregations