Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void run(String... args) throws Exception {
.block();

// Print the each returned activity profile id to the console
response.getBody().stream().forEach(id -> System.out.println(id));
response.getBody().stream().forEach(System.out::println);
}

private void postActivityProfile() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void run(String... args) throws Exception {
.block();

// Print the each returned profile id to the console
response.getBody().stream().forEach(id -> System.out.println(id));
response.getBody().stream().forEach(System.out::println);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public void run(String... args) throws Exception {
StatementResult result = response.getBody();

// Print the returned statements to the console
Arrays.asList(result.getStatements()).forEach(s -> System.out.println(s));
Arrays.asList(result.getStatements()).forEach(System.out::println);

if (result.hasMore()) {
// Get More Statements
ResponseEntity<StatementResult> more =
client.getMoreStatements(r -> r.more(result.getMore())).block();

// Print the returned statements to the console
Arrays.asList(more.getBody().getStatements()).forEach(s -> System.out.println(s));
Arrays.asList(more.getBody().getStatements()).forEach(System.out::println);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public void run(String... args) throws Exception {
var statements = client.getStatementIterator().block();

// Print the returned statements to the console
statements.toStream().forEach(s -> System.out.println(s));
statements.toStream().forEach(System.out::println);

// Get Statements with Verb filter as StatementIterator
var filteredStatements =
client.getStatementIterator(r -> r.verb(Verb.ATTEMPTED)).block();

// Print the returned statements to the console
filteredStatements.toStream().forEach(s -> System.out.println(s));
filteredStatements.toStream().forEach(System.out::println);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void run(String... args) throws Exception {
ResponseEntity<StatementResult> response = client.getStatements().block();

// Print the returned statements to the console
response.getBody().getStatements().forEach(s -> System.out.println(s));
response.getBody().getStatements().forEach(System.out::println);



Expand All @@ -47,7 +47,7 @@ public void run(String... args) throws Exception {
client.getStatements(r -> r.verb(Verb.ATTEMPTED.getId())).block();

// Print the returned statements to the console
filteredResponse.getBody().getStatements().forEach(s -> System.out.println(s));
filteredResponse.getBody().getStatements().forEach(System.out::println);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void run(String... args) throws Exception {
.block();

// Print the each returned state id to the console
response.getBody().stream().forEach(id -> System.out.println(id));
response.getBody().stream().forEach(System.out::println);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void whenBuildingDeleteActivityProfileRequestWithAllParametersThenNoExceptionIsT
.profileId("bookmark");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -50,7 +50,7 @@ void whenBuildingDeleteActivityProfileRequestWithoutRegistrationThenNoExceptionI
.profileId("bookmark");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -63,7 +63,7 @@ void whenBuildingDeleteActivityProfileRequestWithoutActivityIdThenExceptionIsThr
.profileId("bookmark");

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand All @@ -76,7 +76,7 @@ void whenBuildingDeleteActivityProfileRequestWithoutStateIdThenExceptionIsThrown
.activityId(URI.create("https://example.com/activity/1"));

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void whenBuildingDeleteStateRequestWithAllParametersThenNoExceptionIsThrown() {
.stateId("bookmark");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -56,7 +56,7 @@ void whenBuildingDeleteStateRequestWithoutRegistrationThenNoExceptionIsThrown()
.stateId("bookmark");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -73,7 +73,7 @@ void whenBuildingDeleteStateRequestWithoutActivityIdThenExceptionIsThrown() {
.stateId("bookmark");

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand All @@ -90,7 +90,7 @@ void whenBuildingDeleteStateRequestWithoutAgentThenExceptionIsThrown() {
.stateId("bookmark");

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand All @@ -107,7 +107,7 @@ void whenBuildingDeleteStateRequestWithoutStateIdThenExceptionIsThrown() {
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6");

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void whenBuildingDeleteStatesRequestWithAllParametersThenNoExceptionIsThrown() {
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -55,7 +55,7 @@ void whenBuildingDeleteStatesRequestWithRegistrationAsUUIDTypeThenNoExceptionIsT
.registration(UUID.fromString("67828e3a-d116-4e18-8af3-2d2c59e27be6"));

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -72,7 +72,7 @@ void whenBuildingDeleteStatesRequestWithActivityIdAsURITypeThenNoExceptionIsThro
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -87,7 +87,7 @@ void whenBuildingDeleteStatesRequestWithoutRegistrationThenNoExceptionIsThrown()
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"));

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -102,7 +102,7 @@ void whenBuildingDeleteStatesRequestWithoutActivityIdThenExceptionIsThrown() {
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6");

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand All @@ -117,7 +117,7 @@ void whenBuildingDeleteStatesRequestWithoutAgentThenExceptionIsThrown() {
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6");

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void whenBuildingGetActivityProfilesRequestWithAllParametersThenNoExceptionIsThr
.since(Instant.parse("2016-01-01T00:00:00Z"));

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -49,7 +49,7 @@ void whenBuildingGetActivityProfilesRequestWithActivityIdAsURITypeThenNoExceptio
.activityId(URI.create("https://example.com/activity/1"));

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -62,7 +62,7 @@ void whenBuildingGetActivityProfilesRequestWithoutRegistrationThenNoExceptionIsT
.activityId("https://example.com/activity/1");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -73,7 +73,7 @@ void whenBuildingGetActivityProfilesRequestWithoutActivityIdThenExceptionIsThrow
Builder builder = GetActivityProfilesRequest.builder();

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void whenBuildingGetMoreStatementsRequestWithUriParameterThenNoExceptionIsThrown
URI.create("https://example.com/xapi/statements/869cc589-76fa-4283-8e96-eea86f9124e1"));

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -42,7 +42,7 @@ void whenBuildingGetMoreStatementsRequestWithStringParameterThenNoExceptionIsThr
.more("https://example.com/xapi/statements/869cc589-76fa-4283-8e96-eea86f9124e1");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -53,7 +53,7 @@ void whenBuildingGetMoreStatementsRequestWithoutMoreThenNullPointerExceptionIsTh
GetMoreStatementsRequest.Builder builder = GetMoreStatementsRequest.builder();

// Then NullPointerException Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void whenBuildingGetStateRequestWithAllParametersThenNoExceptionIsThrown() {
.stateId("bookmark");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -56,7 +56,7 @@ void whenBuildingGetStateRequestWithoutRegistrationThenNoExceptionIsThrown() {
.stateId("bookmark");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -71,7 +71,7 @@ void whenBuildingGetStateRequestWithoutActivityIdThenNullPointerExceptionIsThrow
.stateId("bookmark");

// Then Null Pointer Exception Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand All @@ -86,7 +86,7 @@ void whenBuildingGetStateRequestWithoutAgentThenNullPointerExceptionIsThrown() {
.stateId("bookmark");

// Then Null Pointer Exception Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand All @@ -101,7 +101,7 @@ void whenBuildingGetStateRequestWithoutStateIdThenNullPointerExceptionIsThrown()
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"));

// Then Null Pointer Exception Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void whenBuildingGetStatementsRequestWithAllParametersThenNoExceptionIsThrown()
.ascending(true);

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void whenBuildingGetStatesRequestWithAllParametersThenNoExceptionIsThrown() {
.since(Instant.now());

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -57,7 +57,7 @@ void whenBuildingGetStatesRequestWithoutSinceParameterThenNoExceptionIsThrown()
.registration("67828e3a-d116-4e18-8af3-2d2c59e27be6");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -72,7 +72,7 @@ void whenBuildingGetStatesRequestWithoutRegistrationParameterThenNoExceptionIsTh
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"));

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -87,7 +87,7 @@ void whenBuildingGetStatesRequestWithRequiredParametersThenNoExceptionIsThrown()
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"));

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand All @@ -100,7 +100,7 @@ void whenBuildingGetStatesRequestWithoutActivityIdThenNullPointerExceptionIsThro
.agent(a -> a.name("A N Other").mbox("mailto:another@example.com"));

// Then Null Pointer Exception Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand All @@ -113,7 +113,7 @@ void whenBuildingGetStatesRequestWithoutAgentThenNullPointerExceptionIsThrown()
.activityId("https://example.com/activity/1");

// Then Null Pointer Exception Is Thrown
assertThrows(NullPointerException.class, () -> builder.build());
assertThrows(NullPointerException.class, builder::build);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void whenBuildingPostStateRequestWithAllParametersThenNoExceptionIsThrown() {
.state("Hello World!");

// Then No Exception Is Thrown
assertDoesNotThrow(() -> builder.build());
assertDoesNotThrow(builder::build);

}

Expand Down
Loading