Skip to content

Commit

Permalink
chore: format source code files
Browse files Browse the repository at this point in the history
  • Loading branch information
yquansah committed Jan 10, 2024
1 parent 14989cb commit eddb555
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public class BatchEvaluationRequest {
private final List<EvaluationRequest> requests;
private Optional<String> reference;

public BatchEvaluationRequest(Optional<String> requestId, List<EvaluationRequest> requests, Optional<String> reference) {
public BatchEvaluationRequest(
Optional<String> requestId, List<EvaluationRequest> requests, Optional<String> reference) {
this.requestId = requestId;
this.requests = requests;
this.reference = reference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ public class EvaluationRequest {
private final Optional<String> reference;

public EvaluationRequest(
String namespaceKey, String flagKey, String entityId, Map<String, String> context, Optional<String> reference) {
String namespaceKey,
String flagKey,
String entityId,
Map<String, String> context,
Optional<String> reference) {
this.namespaceKey = namespaceKey;
this.flagKey = flagKey;
this.entityId = entityId;
Expand Down
3 changes: 2 additions & 1 deletion flipt-java/src/main/java/example/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static void main(String[] args) {
BatchEvaluationResponse batchEvaluationResponse =
fliptClient
.evaluation()
.batch(new BatchEvaluationRequest(Optional.of(""), evaluationRequests, Optional.empty()));
.batch(
new BatchEvaluationRequest(Optional.of(""), evaluationRequests, Optional.empty()));
}
}
12 changes: 9 additions & 3 deletions flipt-java/src/test/java/TestFliptClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ void testVariant() {
Map<String, String> context = new HashMap<>();
context.put("fizz", "buzz");
VariantEvaluationResponse variant =
fc.evaluation().variant(new EvaluationRequest("default", "flag1", "entity", context, Optional.empty()));
fc.evaluation()
.variant(
new EvaluationRequest("default", "flag1", "entity", context, Optional.empty()));

Assertions.assertTrue(variant.isMatch());
Assertions.assertEquals("flag1", variant.getFlagKey());
Expand All @@ -42,7 +44,9 @@ void testBoolean() {

BooleanEvaluationResponse booleanEvaluation =
fc.evaluation()
.booleanEvaluation(new EvaluationRequest("default", "flag_boolean", "entity", context, Optional.empty()));
.booleanEvaluation(
new EvaluationRequest(
"default", "flag_boolean", "entity", context, Optional.empty()));

Assertions.assertTrue(booleanEvaluation.isEnabled());
Assertions.assertEquals("flag_boolean", booleanEvaluation.getFlagKey());
Expand Down Expand Up @@ -75,7 +79,9 @@ void testBatch() {
evaluationRequests.add(errorEvaluationRequest);

BatchEvaluationResponse batch =
fc.evaluation().batch(new BatchEvaluationRequest(Optional.of(""), evaluationRequests, Optional.empty()));
fc.evaluation()
.batch(
new BatchEvaluationRequest(Optional.of(""), evaluationRequests, Optional.empty()));

// Variant
EvaluationResponse first = batch.getResponses().get(0);
Expand Down
5 changes: 4 additions & 1 deletion flipt-rust/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ async fn tests() {
reference: None,
});

let batch_request = BatchEvaluationRequest { requests, reference: None };
let batch_request = BatchEvaluationRequest {
requests,
reference: None,
};
let batch = flipt_client.evaluation.batch(&batch_request).await.unwrap();

// Variant
Expand Down

0 comments on commit eddb555

Please sign in to comment.