Skip to content

Commit 505b142

Browse files
Chase Coalwellgosar
authored andcommitted
Remove tests for shape conflicts (#286)
1 parent 0068b7f commit 505b142

File tree

7 files changed

+0
-115
lines changed

7 files changed

+0
-115
lines changed

smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/CodegenVisitorTest.java

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -99,57 +99,6 @@ public void generatesServiceClients() {
9999
assertThat(manifest.getFileString("ExampleClient.ts").get(), containsString("export class ExampleClient"));
100100
}
101101

102-
@Test void throwsOnShapesThatCannotBeCondensed() {
103-
Model model = Model.assembler()
104-
.addImport(getClass().getResource("simple-service-with-shape-conflict.smithy"))
105-
.addImport(getClass().getResource("simple-service-with-shape-conflict-2.smithy"))
106-
.addImport(getClass().getResource("simple-service-with-shape-conflict-3.smithy"))
107-
.assemble()
108-
.unwrap();
109-
MockManifest manifest = new MockManifest();
110-
PluginContext context = PluginContext.builder()
111-
.model(model)
112-
.fileManifest(manifest)
113-
.pluginClassLoader(getClass().getClassLoader())
114-
.settings(Node.objectNodeBuilder()
115-
.withMember("package", Node.from("example"))
116-
.withMember("packageVersion", Node.from("1.0.0"))
117-
.build())
118-
.build();
119-
120-
Assertions.assertThrows(CodegenException.class, () -> new TypeScriptCodegenPlugin().execute(context));
121-
}
122-
123-
@Test void successfullyCondensesShapesThatMatch() {
124-
Model model = Model.assembler()
125-
.addImport(getClass().getResource("simple-service-with-condensible-shapes.smithy"))
126-
.addImport(getClass().getResource("simple-service-with-condensible-shapes-2.smithy"))
127-
.addImport(getClass().getResource("simple-service-with-condensible-shapes-3.smithy"))
128-
.assemble()
129-
.unwrap();
130-
MockManifest manifest = new MockManifest();
131-
PluginContext context = PluginContext.builder()
132-
.model(model)
133-
.fileManifest(manifest)
134-
.pluginClassLoader(getClass().getClassLoader())
135-
.settings(Node.objectNodeBuilder()
136-
.withMember("package", Node.from("example"))
137-
.withMember("packageVersion", Node.from("1.0.0"))
138-
.build())
139-
.build();
140-
141-
new TypeScriptCodegenPlugin().execute(context);
142-
143-
Assertions.assertTrue(manifest.hasFile("models/index.ts"));
144-
Assertions.assertTrue(manifest.hasFile("models/models_0.ts"));
145-
assertThat(manifest.getFileString("models/index.ts").get(),
146-
containsString("export * from \"./models_0\";"));
147-
assertThat(manifest.getFileString("models/models_0.ts").get(),
148-
containsString("export interface Bar {\n" +
149-
" baz: string | undefined;\n" +
150-
"}"));
151-
}
152-
153102
@Test
154103
public void invokesOnWriterCustomizations() {
155104
// TODO

smithy-typescript-codegen/src/test/resources/software/amazon/smithy/typescript/codegen/simple-service-with-condensible-shapes-2.smithy

Lines changed: 0 additions & 7 deletions
This file was deleted.

smithy-typescript-codegen/src/test/resources/software/amazon/smithy/typescript/codegen/simple-service-with-condensible-shapes-3.smithy

Lines changed: 0 additions & 7 deletions
This file was deleted.

smithy-typescript-codegen/src/test/resources/software/amazon/smithy/typescript/codegen/simple-service-with-condensible-shapes.smithy

Lines changed: 0 additions & 18 deletions
This file was deleted.

smithy-typescript-codegen/src/test/resources/software/amazon/smithy/typescript/codegen/simple-service-with-shape-conflict-2.smithy

Lines changed: 0 additions & 7 deletions
This file was deleted.

smithy-typescript-codegen/src/test/resources/software/amazon/smithy/typescript/codegen/simple-service-with-shape-conflict-3.smithy

Lines changed: 0 additions & 7 deletions
This file was deleted.

smithy-typescript-codegen/src/test/resources/software/amazon/smithy/typescript/codegen/simple-service-with-shape-conflict.smithy

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)