Skip to content

Commit fcf69bd

Browse files
committed
Uncomment other test models
1 parent c1e4bab commit fcf69bd

File tree

1 file changed

+51
-48
lines changed

1 file changed

+51
-48
lines changed

codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/EventStreamTestModels.kt

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ package software.amazon.smithy.rust.codegen.core.testutil
77

88
import software.amazon.smithy.model.Model
99
import software.amazon.smithy.rust.codegen.core.smithy.CodegenContext
10+
import software.amazon.smithy.rust.codegen.core.smithy.protocols.AwsJson
11+
import software.amazon.smithy.rust.codegen.core.smithy.protocols.AwsJsonVersion
1012
import software.amazon.smithy.rust.codegen.core.smithy.protocols.Protocol
1113
import software.amazon.smithy.rust.codegen.core.smithy.protocols.RestJson
14+
import software.amazon.smithy.rust.codegen.core.smithy.protocols.RestXml
1215

1316
private fun fillInBaseModel(
1417
protocolName: String,
@@ -137,57 +140,57 @@ object EventStreamTestModels {
137140
//
138141
// awsJson1_1
139142
//
140-
// TestCase(
141-
// protocolShapeId = "aws.protocols#awsJson1_1",
142-
// model = awsJson11(),
143-
// requestContentType = "application/x-amz-json-1.1",
144-
// responseContentType = "application/x-amz-json-1.1",
145-
// validTestStruct = """{"someString":"hello","someInt":5}""",
146-
// validMessageWithNoHeaderPayloadTraits = """{"someString":"hello","someInt":5}""",
147-
// validTestUnion = """{"Foo":"hello"}""",
148-
// validSomeError = """{"Message":"some error"}""",
149-
// validUnmodeledError = """{"Message":"unmodeled error"}""",
150-
// ) { AwsJson(it, AwsJsonVersion.Json11) },
143+
TestCase(
144+
protocolShapeId = "aws.protocols#awsJson1_1",
145+
model = awsJson11(),
146+
requestContentType = "application/x-amz-json-1.1",
147+
responseContentType = "application/x-amz-json-1.1",
148+
validTestStruct = """{"someString":"hello","someInt":5}""",
149+
validMessageWithNoHeaderPayloadTraits = """{"someString":"hello","someInt":5}""",
150+
validTestUnion = """{"Foo":"hello"}""",
151+
validSomeError = """{"Message":"some error"}""",
152+
validUnmodeledError = """{"Message":"unmodeled error"}""",
153+
) { AwsJson(it, AwsJsonVersion.Json11) },
151154

152155
//
153156
// restXml
154157
//
155-
// TestCase(
156-
// protocolShapeId = "aws.protocols#restXml",
157-
// model = restXml(),
158-
// requestContentType = "application/xml",
159-
// responseContentType = "application/xml",
160-
// validTestStruct = """
161-
// <TestStruct>
162-
// <someString>hello</someString>
163-
// <someInt>5</someInt>
164-
// </TestStruct>
165-
// """.trimIndent(),
166-
// validMessageWithNoHeaderPayloadTraits = """
167-
// <MessageWithNoHeaderPayloadTraits>
168-
// <someString>hello</someString>
169-
// <someInt>5</someInt>
170-
// </MessageWithNoHeaderPayloadTraits>
171-
// """.trimIndent(),
172-
// validTestUnion = "<TestUnion><Foo>hello</Foo></TestUnion>",
173-
// validSomeError = """
174-
// <ErrorResponse>
175-
// <Error>
176-
// <Type>SomeError</Type>
177-
// <Code>SomeError</Code>
178-
// <Message>some error</Message>
179-
// </Error>
180-
// </ErrorResponse>
181-
// """.trimIndent(),
182-
// validUnmodeledError = """
183-
// <ErrorResponse>
184-
// <Error>
185-
// <Type>UnmodeledError</Type>
186-
// <Code>UnmodeledError</Code>
187-
// <Message>unmodeled error</Message>
188-
// </Error>
189-
// </ErrorResponse>
190-
// """.trimIndent(),
191-
// ) { RestXml(it) },
158+
TestCase(
159+
protocolShapeId = "aws.protocols#restXml",
160+
model = restXml(),
161+
requestContentType = "application/xml",
162+
responseContentType = "application/xml",
163+
validTestStruct = """
164+
<TestStruct>
165+
<someString>hello</someString>
166+
<someInt>5</someInt>
167+
</TestStruct>
168+
""".trimIndent(),
169+
validMessageWithNoHeaderPayloadTraits = """
170+
<MessageWithNoHeaderPayloadTraits>
171+
<someString>hello</someString>
172+
<someInt>5</someInt>
173+
</MessageWithNoHeaderPayloadTraits>
174+
""".trimIndent(),
175+
validTestUnion = "<TestUnion><Foo>hello</Foo></TestUnion>",
176+
validSomeError = """
177+
<ErrorResponse>
178+
<Error>
179+
<Type>SomeError</Type>
180+
<Code>SomeError</Code>
181+
<Message>some error</Message>
182+
</Error>
183+
</ErrorResponse>
184+
""".trimIndent(),
185+
validUnmodeledError = """
186+
<ErrorResponse>
187+
<Error>
188+
<Type>UnmodeledError</Type>
189+
<Code>UnmodeledError</Code>
190+
<Message>unmodeled error</Message>
191+
</Error>
192+
</ErrorResponse>
193+
""".trimIndent(),
194+
) { RestXml(it) },
192195
)
193196
}

0 commit comments

Comments
 (0)