diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/ScenariosTests.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/ScenariosTests.cs index 30b591aa..13adcc50 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/ScenariosTests.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/ScenariosTests.cs @@ -367,12 +367,10 @@ private static async Task AssertGenerateForClientCSharp( sbCommands.Append(scenarioPath.Name); sbCommands.Append(" --outputPath "); sbCommands.Append(Path.Combine(outputPath.FullName, "src")); - if (!useCustomErrorResponseModel) + if (!useCustomErrorResponseModel && + useProblemDetailsAsDefaultResponseBody) { - if (useProblemDetailsAsDefaultResponseBody) - { - sbCommands.Append(" --useProblemDetailsAsDefaultResponseBody"); - } + sbCommands.Append(" --useProblemDetailsAsDefaultResponseBody"); } if (optionsFile is not null)