Skip to content

Commit b143a00

Browse files
committed
update unit tests
1 parent 0ae0bf6 commit b143a00

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import software.amazon.smithy.model.shapes.StructureShape;
1616
import software.amazon.smithy.typescript.codegen.TypeScriptSettings.RequiredMemberMode;
1717

18-
@Disabled("WIP")
1918
public class StructureGeneratorTest {
2019
@Test
2120
public void properlyGeneratesEmptyMessageMemberOfException() {

smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/endpointsV2/EndpointsV2GeneratorTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import software.amazon.smithy.typescript.codegen.CodegenUtils;
1414
import software.amazon.smithy.typescript.codegen.TypeScriptCodegenPlugin;
1515

16-
@Disabled("WIP")
1716
public class EndpointsV2GeneratorTest {
1817
@Test
1918
public void containsTrailingSemicolon() {

smithy-typescript-codegen/src/test/java/software/amazon/smithy/typescript/codegen/integration/AddHttpApiKeyAuthPluginTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import software.amazon.smithy.typescript.codegen.CodegenUtils;
3030
import software.amazon.smithy.typescript.codegen.TypeScriptClientCodegenPlugin;
3131

32-
@Disabled("WIP")
3332
public class AddHttpApiKeyAuthPluginTest {
3433
@Test
3534
public void httpApiKeyAuthClientOnService() {
@@ -63,13 +62,13 @@ private void testInjects(String filename, String extra) {
6362
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/commands/GetFooCommand.ts").get(),
6463
containsString("from \"../middleware/HttpApiKeyAuth\""));
6564
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/commands/GetFooCommand.ts").get(),
66-
containsString("this.middlewareStack.use(getHttpApiKeyAuthPlugin(configuration" + extra + "));"));
65+
containsString("getHttpApiKeyAuthPlugin(config" + extra + ")"));
6766

6867
// Ensure that the GetBar operation does not import the middleware or use it.
6968
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/commands/GetBarCommand.ts").get(),
7069
not(containsString("from \"../middleware/HttpApiKeyAuth\"")));
7170
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/commands/GetBarCommand.ts").get(),
72-
not(containsString("this.middlewareStack.use(getHttpApiKeyAuthPlugin")));
71+
not(containsString("getHttpApiKeyAuthPlugin")));
7372

7473
// Make sure that the middleware file was written and exports the plugin symbol.
7574
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/middleware/HttpApiKeyAuth/index.ts").get(),
@@ -126,7 +125,7 @@ private void testDoesNotInject(String filename) {
126125
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/commands/GetFooCommand.ts").get(),
127126
not(containsString("from \"../middleware/HttpApiKeyAuth\"")));
128127
assertThat(manifest.getFileString(CodegenUtils.SOURCE_FOLDER + "/commands/GetFooCommand.ts").get(),
129-
not(containsString("this.middlewareStack.use(getHttpApiKeyAuthPlugin(configuration")));
128+
not(containsString("getHttpApiKeyAuthPlugin(configuration")));
130129

131130
// Make sure that the middleware file was not written.
132131
assertThat(manifest.hasFile(CodegenUtils.SOURCE_FOLDER + "/middleware/HttpApiKeyAuth/index.ts"),

0 commit comments

Comments
 (0)