You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.error(s"A trace specified project ID $projectId, but there is no project with that ID.")
305
+
}
306
+
} else {
307
+
logger.error(s"A trace specified project ID $projectId, but the value of cp.userSettings.skipUserAcknowledgment prevents skipping user acknowledgement.")
308
+
}
309
+
}
310
+
292
311
// if the trace 'completes' before it has been acknowledged, we need to look for a new one
293
312
// (this might happen if the agent gets ctrl+C'd before the ack)
Copy file name to clipboardExpand all lines: dotnet-tracer/main/CodePulse.Console.Test/CommandLineParserTests.cs
+39
Original file line number
Diff line number
Diff line change
@@ -281,6 +281,45 @@ public void WhenAppModeWithLogAllSpecifiedSuccess()
281
281
ValidateCommandLineArguments(parameters);
282
282
}
283
283
284
+
[TestMethod]
285
+
publicvoidWhenProjectIdInvalidExceptionOccurs()
286
+
{
287
+
// arrange
288
+
varparameters=new[]
289
+
{
290
+
"-Target:file",
291
+
"-SendVisitPointsTimerInterval:45",
292
+
"-ProjectId:not-an-id"
293
+
};
294
+
ValidateCommandLineArguments(parameters,"The Code Pulse project ID must be a valid identifier: not-an-id is not a valid value for Int32.");
295
+
}
296
+
297
+
[TestMethod]
298
+
publicvoidWhenProjectIdSpecifiedCorrectly()
299
+
{
300
+
// arrange
301
+
varparameters=new[]
302
+
{
303
+
"-Target:file",
304
+
"-SendVisitPointsTimerInterval:45",
305
+
"-ProjectId:1"
306
+
};
307
+
ValidateCommandLineArguments(parameters);
308
+
}
309
+
310
+
[TestMethod]
311
+
publicvoidWhenProjectIdNegativeExceptionOccurs()
312
+
{
313
+
// arrange
314
+
varparameters=new[]
315
+
{
316
+
"-Target:file",
317
+
"-SendVisitPointsTimerInterval:45",
318
+
"-ProjectId:-11"
319
+
};
320
+
ValidateCommandLineArguments(parameters,"The Code Pulse project ID must be a valid identifier: The argument projectid must be between 0 and 2147483647");
0 commit comments