@@ -26,6 +26,11 @@ public class ClaudeExecTests
2626 private const string DescriptionPropertyName = "Description" ;
2727 private const string DescriptionPropertyNameCamel = "description" ;
2828 private const string DisallowedToolsFlag = "--disallowed-tools" ;
29+ private const string EffortFlag = "--effort" ;
30+ private const string EffortHighValue = "high" ;
31+ private const string EffortLowValue = "low" ;
32+ private const string EffortMaxValue = "max" ;
33+ private const string EffortMediumValue = "medium" ;
2934 private const string ExampleBaseUrl = "https://example.invalid" ;
3035 private const string FeatureABeta = "feature-a" ;
3136 private const string FeatureBBeta = "feature-b" ;
@@ -41,6 +46,7 @@ public class ClaudeExecTests
4146 private const string McpConfigPath = "/tmp/mcp.json" ;
4247 private const string McpConfigTwo = """{"name":"two","command":"uvx","args":["c","d"]}""" ;
4348 private const string ModelFlag = "--model" ;
49+ private const string NameFlag = "--name" ;
4450 private const string OutputFormatFlag = "--output-format" ;
4551 private const string OutputSchemaMessageFragment = "ReplayUserMessages" ;
4652 private const string PerTurnHookValue = "per-turn-hook" ;
@@ -59,6 +65,7 @@ public class ClaudeExecTests
5965 private const string ResumeSessionId = "session-1" ;
6066 private const string ReviewerAgentKey = "reviewer" ;
6167 private const string ReviewerPrompt = "Review code changes" ;
68+ private const string SessionDisplayName = "my-session" ;
6269 private const string SettingSourcesFlag = "--setting-sources" ;
6370 private const string SettingsFlag = "--settings" ;
6471 private const string StreamJsonOutputFormat = "stream-json" ;
@@ -206,6 +213,64 @@ public async Task BuildCommandArgs_WithReservedAdditionalCliFlag_Throws()
206213 await Assert . That ( exception ! . Message ) . Contains ( ReservedOutputFormatFlag ) ;
207214 }
208215
216+ [ Test ]
217+ [ Arguments ( EffortLevel . Low , EffortLowValue ) ]
218+ [ Arguments ( EffortLevel . Medium , EffortMediumValue ) ]
219+ [ Arguments ( EffortLevel . High , EffortHighValue ) ]
220+ [ Arguments ( EffortLevel . Max , EffortMaxValue ) ]
221+ public async Task BuildCommandArgs_WithEffort_MapsToCliValue ( EffortLevel effort , string expectedCliValue )
222+ {
223+ var exec = new ClaudeExec ( executablePath : TestConstants . ClaudeExecutablePath ) ;
224+
225+ var commandArgs = exec . BuildCommandArgs ( new ClaudeExecArgs
226+ {
227+ Input = SummarizeInput ,
228+ Effort = effort ,
229+ } ) ;
230+
231+ await Assert . That ( GetRequiredFlagValue ( commandArgs , EffortFlag ) ) . IsEqualTo ( expectedCliValue ) ;
232+ }
233+
234+ [ Test ]
235+ public async Task BuildCommandArgs_WithoutEffort_OmitsEffortFlag ( )
236+ {
237+ var exec = new ClaudeExec ( executablePath : TestConstants . ClaudeExecutablePath ) ;
238+
239+ var commandArgs = exec . BuildCommandArgs ( new ClaudeExecArgs
240+ {
241+ Input = SummarizeInput ,
242+ } ) ;
243+
244+ await Assert . That ( commandArgs . Contains ( EffortFlag ) ) . IsFalse ( ) ;
245+ }
246+
247+ [ Test ]
248+ public async Task BuildCommandArgs_WithName_MapsToCliFlag ( )
249+ {
250+ var exec = new ClaudeExec ( executablePath : TestConstants . ClaudeExecutablePath ) ;
251+
252+ var commandArgs = exec . BuildCommandArgs ( new ClaudeExecArgs
253+ {
254+ Input = SummarizeInput ,
255+ Name = SessionDisplayName ,
256+ } ) ;
257+
258+ await Assert . That ( GetRequiredFlagValue ( commandArgs , NameFlag ) ) . IsEqualTo ( SessionDisplayName ) ;
259+ }
260+
261+ [ Test ]
262+ public async Task BuildCommandArgs_WithoutName_OmitsNameFlag ( )
263+ {
264+ var exec = new ClaudeExec ( executablePath : TestConstants . ClaudeExecutablePath ) ;
265+
266+ var commandArgs = exec . BuildCommandArgs ( new ClaudeExecArgs
267+ {
268+ Input = SummarizeInput ,
269+ } ) ;
270+
271+ await Assert . That ( commandArgs . Contains ( NameFlag ) ) . IsFalse ( ) ;
272+ }
273+
209274 private static JsonObject CreateBaseSettings ( )
210275 {
211276 return new JsonObject
0 commit comments