Skip to content

Commit

Permalink
Use TypeScriptClientCodegenPlugin in tests (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Sep 5, 2024
1 parent c8c53ae commit 12d9afe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private void testCommmandCodegen(String filename, String[] expectedTypeArray) {
.build())
.build();

new TypeScriptCodegenPlugin().execute(context);
new TypeScriptClientCodegenPlugin().execute(context);
String contents = manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "//commands/GetFooCommand.ts").get();

assertThat(contents, containsString("as __MetadataBearer"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ private String testStructureCodegenBase(
.build())
.build();

new TypeScriptCodegenPlugin().execute(context);
new TypeScriptClientCodegenPlugin().execute(context);
String contents = manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "//models/models_0.ts").get();

if (assertContains) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void generatesRuntimeConfigFiles() {
.build())
.build();

new TypeScriptCodegenPlugin().execute(context);
new TypeScriptClientCodegenPlugin().execute(context);

// Did we generate the runtime config files?
// note that asserting the contents of runtime config files is handled in its own unit tests.
Expand Down Expand Up @@ -66,7 +66,7 @@ public void decoratesSymbolProvider() {
.build())
.build();

new TypeScriptCodegenPlugin().execute(context);
new TypeScriptClientCodegenPlugin().execute(context);

assertTrue(manifest.hasFile("Foo.ts"));
assertThat(manifest.getFileString("Foo.ts").get(), containsString("export class Foo"));
Expand All @@ -88,7 +88,7 @@ public void generatesServiceClients() {
.withMember("packageVersion", Node.from("1.0.0"))
.build())
.build();
new TypeScriptCodegenPlugin().execute(context);
new TypeScriptClientCodegenPlugin().execute(context);

assertTrue(manifest.hasFile(CodegenUtils.SOURCE_FOLDER + "/Example.ts"));
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/Example.ts").get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import software.amazon.smithy.model.Model;
import software.amazon.smithy.model.node.Node;
import software.amazon.smithy.typescript.codegen.CodegenUtils;
import software.amazon.smithy.typescript.codegen.TypeScriptCodegenPlugin;
import software.amazon.smithy.typescript.codegen.TypeScriptClientCodegenPlugin;

public class EndpointsV2GeneratorTest {
@Test
Expand Down Expand Up @@ -79,7 +79,7 @@ private MockManifest testEndpoints(String filename) {
.build())
.build();

new TypeScriptCodegenPlugin().execute(context);
new TypeScriptClientCodegenPlugin().execute(context);

assertThat(manifest.hasFile(CodegenUtils.SOURCE_FOLDER + "/endpoint/EndpointParameters.ts"),
is(true));
Expand Down

0 comments on commit 12d9afe

Please sign in to comment.