From 36016709394b55fd31d56fdba0f680e5e201a672 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Wed, 4 Sep 2024 12:58:28 -0700 Subject: [PATCH] test(codegen): use TypeScriptClientCodegenPlugin (#6437) --- .../aws/typescript/codegen/AddAwsAuthPluginTest.java | 8 ++++---- .../aws/typescript/codegen/AddAwsRuntimeConfigTest.java | 8 ++++---- .../aws/typescript/codegen/AddBuiltinPluginsTest.java | 8 ++++---- .../typescript/codegen/AddUserAgentDependencyTest.java | 6 +++--- .../codegen/AwsEndpointGeneratorIntegrationTest.java | 6 +++--- .../AwsPackageFixturesGeneratorIntegrationTest.java | 6 +++--- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsAuthPluginTest.java b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsAuthPluginTest.java index d50c445ea0393..bc67824418e80 100644 --- a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsAuthPluginTest.java +++ b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsAuthPluginTest.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 AddAwsAuthPluginTest { @Test @@ -32,7 +32,7 @@ public void awsClient() { .withMember("useLegacyAuth", Node.from(true)) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), @@ -70,7 +70,7 @@ public void sigV4GenericClient() { .withMember("useLegacyAuth", Node.from(true)) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), @@ -108,7 +108,7 @@ public void notSigV4GenericClient() { .withMember("useLegacyAuth", Node.from(true)) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), diff --git a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.java b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.java index 82aed4552639b..7c21e5c839c48 100644 --- a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.java +++ b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfigTest.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; import software.amazon.smithy.typescript.codegen.TypeScriptDependency; public class AddAwsRuntimeConfigTest { @@ -32,7 +32,7 @@ public void awsClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), @@ -79,7 +79,7 @@ public void sigV4GenericClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), @@ -121,7 +121,7 @@ public void notSigV4GenericClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), diff --git a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPluginsTest.java b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPluginsTest.java index 1d836060ae3d2..631bbc28e1e9d 100644 --- a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPluginsTest.java +++ b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddBuiltinPluginsTest.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 AddBuiltinPluginsTest { @Test @@ -31,7 +31,7 @@ public void awsClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check the config resolution and middleware plugin assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/NotSameClient.ts").get(), containsString("resolveRegionConfig")); @@ -61,7 +61,7 @@ public void sigV4GenericClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check the config resolution and middleware plugin assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/SsdkExampleSigV4Client.ts").get(), containsString("resolveRegionConfig")); @@ -91,7 +91,7 @@ public void notSigV4GenericClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check the config resolution and middleware plugin assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/SsdkExampleClient.ts").get(), not(containsString("resolveRegionConfig"))); diff --git a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddUserAgentDependencyTest.java b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddUserAgentDependencyTest.java index 347ce2d0390fc..76ca40f6986da 100644 --- a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddUserAgentDependencyTest.java +++ b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AddUserAgentDependencyTest.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 AddUserAgentDependencyTest { @Test @@ -31,7 +31,7 @@ public void awsClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), @@ -72,7 +72,7 @@ public void genericClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); // Check dependencies assertThat(manifest.getFileString("package.json").get(), diff --git a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsEndpointGeneratorIntegrationTest.java b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsEndpointGeneratorIntegrationTest.java index 9a718390eebbd..c0b4416482fd4 100644 --- a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsEndpointGeneratorIntegrationTest.java +++ b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsEndpointGeneratorIntegrationTest.java @@ -9,7 +9,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; import software.amazon.smithy.typescript.codegen.TypeScriptServerCodegenPlugin; public class AwsEndpointGeneratorIntegrationTest { @@ -31,7 +31,7 @@ public void awsClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); assertTrue(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/endpoints.ts").isPresent()); } @@ -54,7 +54,7 @@ public void genericClient() { .withMember("packageVersion", Node.from("1.0.0")) .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); assertFalse(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/endpoints.ts").isPresent()); } diff --git a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsPackageFixturesGeneratorIntegrationTest.java b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsPackageFixturesGeneratorIntegrationTest.java index 9e0c08e8a9261..3dd9f31dc0222 100644 --- a/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsPackageFixturesGeneratorIntegrationTest.java +++ b/codegen/smithy-aws-typescript-codegen/src/test/java/software/amazon/smithy/aws/typescript/codegen/AwsPackageFixturesGeneratorIntegrationTest.java @@ -11,7 +11,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; import software.amazon.smithy.typescript.codegen.TypeScriptServerCodegenPlugin; public class AwsPackageFixturesGeneratorIntegrationTest { @@ -33,7 +33,7 @@ public void awsClient() { .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); assertTrue(manifest.hasFile("LICENSE")); assertTrue(manifest.hasFile("README.md")); @@ -64,7 +64,7 @@ public void genericClient() { .build()) .build(); - new TypeScriptCodegenPlugin().execute(context); + new TypeScriptClientCodegenPlugin().execute(context); assertTrue(manifest.hasFile("LICENSE")); assertTrue(manifest.hasFile(".gitignore"));