diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java index 4f64c6d4ced..82420b69801 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java @@ -37,6 +37,7 @@ public final class CodegenUtils { public static final String SOURCE_FOLDER = "src"; + public static final String TEST_FOLDER = "test"; private CodegenUtils() {} diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java index af55e09f933..8566cdfc18f 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java @@ -409,7 +409,7 @@ private void setupStubService(Symbol operationSymbol, String getHandlerName = "get" + handlerSymbol.getName(); writer.addImport(getHandlerName, null, - Paths.get(".", CodegenUtils.SOURCE_FOLDER, ServerSymbolVisitor.SERVER_FOLDER).toString()); + Paths.get(".", CodegenUtils.TEST_FOLDER, ServerSymbolVisitor.SERVER_FOLDER).toString()); if (!usesDefaultValidation) { writer.addImport("ValidationFailure", "__ValidationFailure", "@aws-smithy/server-common"); @@ -747,7 +747,7 @@ private void writeServerResponseTest(OperationShape operation, HttpResponseTestC + " { return new TestSerializer(); };", serviceOperationsSymbol, serviceSymbol); writer.addImport("serializeFrameworkException", null, - Paths.get(".", CodegenUtils.SOURCE_FOLDER, ProtocolGenerator.PROTOCOLS_FOLDER, + Paths.get(".", CodegenUtils.TEST_FOLDER, ProtocolGenerator.PROTOCOLS_FOLDER, ProtocolGenerator.getSanitizedName(protocolGenerator.getName())).toString()); writer.addImport("ValidationFailure", "__ValidationFailure", "@aws-smithy/server-common"); writer.write("const handler = new $T(service, testMux, serFn, serializeFrameworkException, "