-
-
Save gerane/5cb6d6e3b1c1419b6ffec29cb4cdc764 to your computer and use it in GitHub Desktop.
Faking call to external static method in Pester
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add-type -TypeDefinition @" | |
using System; | |
public static class KeyboardEventTestUtil { | |
public static string keybd_event(byte bVk, byte bScan, UInt32 dwFlags, System.UIntPtr dwExtraInfo) { | |
return string.Format("{0}:{1}:{2}:{3}", bVk,bScan,dwFlags,dwExtraInfo); | |
} | |
} | |
"@ | |
describe "t" { | |
it "b" { | |
[KeyboardEventTestUtil]::keybd_event(1,1,1,[UIntPtr]::Zero) | should be "1:1:1:0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment