From 12d9afe28b7b0b0868f30425f0181586e06122ce Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:31:38 -0700 Subject: [PATCH] Use TypeScriptClientCodegenPlugin in tests (#1387) --- .../smithy/typescript/codegen/CommandGeneratorTest.java | 2 +- .../smithy/typescript/codegen/StructureGeneratorTest.java | 2 +- .../typescript/codegen/TypeScriptCodegenPluginTest.java | 6 +++--- .../codegen/endpointsV2/EndpointsV2GeneratorTest.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/CommandGeneratorTest.java b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/CommandGeneratorTest.java index 9289684b4a1..00c2acccb3e 100644 --- a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/CommandGeneratorTest.java +++ b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/CommandGeneratorTest.java @@ -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")); diff --git a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java index 4ae57404ef6..bce45c862ed 100644 --- a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java +++ b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/StructureGeneratorTest.java @@ -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) { diff --git a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/TypeScriptCodegenPluginTest.java b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/TypeScriptCodegenPluginTest.java index 249ed3db80c..4a59fb6bd26 100644 --- a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/TypeScriptCodegenPluginTest.java +++ b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/TypeScriptCodegenPluginTest.java @@ -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. @@ -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")); @@ -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(), diff --git a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2GeneratorTest.java b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2GeneratorTest.java index ecc03eeceaa..3ddcf262626 100644 --- a/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2GeneratorTest.java +++ b/smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2GeneratorTest.java @@ -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 @@ -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));