public void Start_on_execute_should_throw_NotImplementedException() { using (new IndirectionsContext()) { // Arrange PULDllImport.ExcludeGeneric().DefaultBehavior = IndirectionBehaviors.NotImplemented; // Act, Assert ExceptionAssert.Throws <NotImplementedException>(() => new ULDllImport().Start()); } }
public void FormatCurrentProcessId_on_execute_should_return_expected() { using (new IndirectionsContext()) { // Arrange var expected = 3500; PULDllImport.GetCurrentProcessId().Body = () => expected; // Act var actual = new ULDllImport().FormatCurrentProcessId(); // Assert Assert.AreEqual(string.Format("The current process ID is {0}", expected), actual); } }
public void Is64BitProcessMessage_on_64_bit_execute_should_return_expected() { using (new IndirectionsContext()) { // Arrange PULDllImport.IsWow64ProcessIntPtrBooleanRef().Body = (IntPtr processHandle, out bool wow64Process) => { wow64Process = true; return(true); }; // Act var actual = new ULDllImport().Is64BitProcessMessage(); // Assert Assert.AreEqual("This is a 32 bit process!", actual); } }