Skip to content

Commit

Permalink
#908: #908: added fromNullable to FluentSubscriptionRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
uweschaefer committed Jun 27, 2020
1 parent 70e1196 commit 121d09b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -27,6 +27,8 @@ public interface SpecBuilder {

SubscriptionRequest from(@NonNull UUID id);

SubscriptionRequest fromNullable(UUID id);

SubscriptionRequest fromScratch();

SubscriptionRequest fromNowOn();
Expand Down
Expand Up @@ -40,6 +40,12 @@ void testFollowNull() {
(FactSpec) null));
}

@Test
void testFollowNullable() {
SubscriptionRequest req = SubscriptionRequest.follow(FactSpec.ns("foo")).fromNullable(null);
assertFalse(req.startingAfter().isPresent());
}

@Test
void testCatchupNull() {
Assertions.assertThrows(NullPointerException.class, () -> SubscriptionRequest.catchup(
Expand Down

0 comments on commit 121d09b

Please sign in to comment.