Skip to content

Commit 9f4a6a5

Browse files
authored
Merge pull request #8457 from maddieclayton/asjobtest
Add test for boolean casting
2 parents 4554801 + a3a74f1 commit 9f4a6a5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Accounts/Authentication.Test/LongRunningCmdletTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,20 @@ public void CanHandleShouldProcessExceptionForConfirm()
144144
});
145145
}
146146

147+
[Fact]
148+
[Trait(Category.AcceptanceType, Category.CheckIn)]
149+
public void CanHandleConfirmSetToFalse()
150+
{
151+
Mock<ICommandRuntime> mockRuntime;
152+
var cmdlet = SetupCmdlet(true, false, out mockRuntime);
153+
cmdlet.MyInvocation.BoundParameters["Confirm"] = new SwitchParameter(false);
154+
var job = cmdlet.ExecuteAsJob("Test Job") as AzureLongRunningJob<AzureStreamTestCmdlet>;
155+
WaitForCompletion(job, j =>
156+
{
157+
ValidateCompletedCmdlet(job);
158+
});
159+
}
160+
147161
[Fact]
148162
[Trait(Category.AcceptanceType, Category.CheckIn)]
149163
public void CanHandleShouldProcessExceptionForWhatIf()

0 commit comments

Comments
 (0)