Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
sbarker2 committed Mar 6, 2024
1 parent 61e400f commit 9f3cdfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
5 changes: 2 additions & 3 deletions test/src/test/kotlin/graphql/nadel/tests/EngineTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,9 @@ private suspend fun execute(

if (indexOfCall != null) {
val serviceCall = serviceCalls.removeAt(indexOfCall)
if( serviceCall.incrementalResponse != null){
if (serviceCall.incrementalResponse != null) {
serviceCall.incrementalResponse.initialResponse //for now, just return initial response
}
else {
} else {
serviceCall.response!!
}
} else {
Expand Down
10 changes: 2 additions & 8 deletions test/src/test/kotlin/graphql/nadel/tests/TestFixture.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@ data class TestFixture(
@JsonInclude(NON_NULL)
val operationName: String? = null,
val serviceCalls: List<ServiceCall>,


@JsonProperty("response")
val responseJsonString: String?,

@JsonProperty("incrementalResponse")
val incrementalResponseJsonString: IncrementalResponse?,

@JsonInclude(NON_NULL)
val exception: ExpectedException?,
) {
Expand All @@ -48,10 +44,8 @@ data class TestFixture(
data class ServiceCall(
val serviceName: String,
val request: Request,

@JsonProperty("response")
val responseJsonString: String?,

val incrementalResponse: IncrementalResponse?,
) {
@get:JsonIgnore
Expand Down Expand Up @@ -100,13 +94,13 @@ data class ExpectedException(
)
}
}

data class IncrementalResponse(
@JsonProperty("initialResponse")
val initialResponseJsonString: String,
@JsonProperty("delayedResponses")
val delayedResponsesJsonString: String,
)
{
) {
@get:JsonIgnore
val initialResponse: JsonMap by lazy {
jsonObjectMapper.readValue(initialResponseJsonString)
Expand Down

0 comments on commit 9f3cdfc

Please sign in to comment.