Skip to content

Instantly share code, notes, and snippets.

@nohwnd
nohwnd / Faking_Static_Call_in_Pester.ps1
Created May 20, 2016 13:25
Faking call to external static method in Pester
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" {