use of io.spine.client.SubscriptionId in project core-java by SpineEventEngine.
the class SubscriptionRecordShould method be_equal_if_has_same_subscription.
@Test
public void be_equal_if_has_same_subscription() {
final Subscription oneSubscription = Given.subscription();
final SubscriptionId breakingId = Subscriptions.newId("breaking-id");
final Subscription otherSubscription = Subscription.newBuilder().setId(breakingId).build();
@SuppressWarnings("QuestionableName") final SubscriptionRecord one = new SubscriptionRecord(oneSubscription, Given.target(), Given.TYPE);
final SubscriptionRecord similar = new SubscriptionRecord(otherSubscription, Given.target(), Given.TYPE);
final SubscriptionRecord same = new SubscriptionRecord(oneSubscription, Given.target(), Given.TYPE);
assertFalse(one.equals(similar));
assertTrue(one.equals(same));
}
Aggregations