@@ -8,7 +8,7 @@ package aws.sdk.kotlin.codegen.protocols.json
88import org.junit.jupiter.api.Assertions
99import org.junit.jupiter.api.Test
1010import software.amazon.smithy.kotlin.codegen.model.expectShape
11- import software.amazon.smithy.kotlin.codegen.test.generateTestContext
11+ import software.amazon.smithy.kotlin.codegen.test.newTestContext
1212import software.amazon.smithy.kotlin.codegen.test.toSmithyModel
1313import software.amazon.smithy.model.knowledge.HttpBinding
1414import software.amazon.smithy.model.shapes.OperationShape
@@ -47,7 +47,7 @@ class AwsJsonHttpBindingResolverTest {
4747
4848 @Test
4949 fun `it resolves all operations associated with a service` () {
50- val ctx = testModel.generateTestContext( " smithy.example " , " Example " )
50+ val ( ctx, _, _) = testModel.newTestContext( " Example " , " smithy.example " )
5151
5252 val unit = AwsJsonHttpBindingResolver (ctx, " application/json" )
5353
@@ -59,7 +59,7 @@ class AwsJsonHttpBindingResolverTest {
5959
6060 @Test
6161 fun `it returns no request bindings for operations without inputs` () {
62- val ctx = testModel.generateTestContext( " smithy.example " , " Example " )
62+ val ( ctx, _, _) = testModel.newTestContext( " Example " , " smithy.example " )
6363 val operation = testModel.expectShape<OperationShape >(" smithy.example#GetEmptyFoo" )
6464 val unit = AwsJsonHttpBindingResolver (ctx, " application/json" )
6565
@@ -70,7 +70,7 @@ class AwsJsonHttpBindingResolverTest {
7070
7171 @Test
7272 fun `it returns request bindings for operations with inputs` () {
73- val ctx = testModel.generateTestContext( " smithy.example " , " Example " )
73+ val ( ctx, _, _) = testModel.newTestContext( " Example " , " smithy.example " )
7474 val operation = testModel.expectShape<OperationShape >(" smithy.example#GetFoo" )
7575 val unit = AwsJsonHttpBindingResolver (ctx, " application/json" )
7676
@@ -87,7 +87,7 @@ class AwsJsonHttpBindingResolverTest {
8787
8888 @Test
8989 fun `it returns no response bindings for operations without inputs` () {
90- val ctx = testModel.generateTestContext( " smithy.example " , " Example " )
90+ val ( ctx, _, _) = testModel.newTestContext( " Example " , " smithy.example " )
9191 val operation = testModel.expectShape<OperationShape >(" smithy.example#GetEmptyFoo" )
9292 val unit = AwsJsonHttpBindingResolver (ctx, " application/json" )
9393
@@ -98,7 +98,7 @@ class AwsJsonHttpBindingResolverTest {
9898
9999 @Test
100100 fun `it returns response bindings for operations with inputs` () {
101- val ctx = testModel.generateTestContext( " smithy.example " , " Example " )
101+ val ( ctx, _, _) = testModel.newTestContext( " Example " , " smithy.example " )
102102 val operation = testModel.expectShape<OperationShape >(" smithy.example#GetFoo" )
103103 val unit = AwsJsonHttpBindingResolver (ctx, " application/json" )
104104
@@ -115,7 +115,7 @@ class AwsJsonHttpBindingResolverTest {
115115
116116 @Test
117117 fun `it returns no response bindings for structures without members` () {
118- val ctx = testModel.generateTestContext( " smithy.example " , " Example " )
118+ val ( ctx, _, _) = testModel.newTestContext( " Example " , " smithy.example " )
119119 val structure = testModel.expectShape<StructureShape >(" smithy.example#GetFooError" )
120120 val unit = AwsJsonHttpBindingResolver (ctx, " application/json" )
121121
@@ -126,7 +126,7 @@ class AwsJsonHttpBindingResolverTest {
126126
127127 @Test
128128 fun `it returns response bindings for structures with members` () {
129- val ctx = testModel.generateTestContext( " smithy.example " , " Example " )
129+ val ( ctx, _, _) = testModel.newTestContext( " Example " , " smithy.example " )
130130 val structure = testModel.expectShape<StructureShape >(" smithy.example#GetFooOutput" )
131131 val unit = AwsJsonHttpBindingResolver (ctx, " application/json" )
132132
0 commit comments