public void ReplyRequest_ForStoppedOutside() { driver.Start(); driverSC.SetStatus(ServiceControllerStatus.Stopped); AdvAssert.ThrowsInvalidOperation(() => driver.ReplyRequest(new ACCESS_REQUEST(), false)); }
public void GetRequest_ForStoppedOutside() { driver.Start(); driverSC.SetStatus(ServiceControllerStatus.Stopped); AdvAssert.ThrowsInvalidOperation(() => driver.GetRequest()); }
public void SendCommand_ToStartedOutside() { // Start outside driverSC.SetStatus(ServiceControllerStatus.Running); AdvAssert.ThrowsInvalidOperation(() => driver.SendCommand(COMMAND_TYPE.ADD, @"C:\SomeFolder\somefile.txt", 0)); }
public void DetailsVisibile_WhenLogViewIsNull() { var presenter = new LogViewPresenter(new LogViewModel(eventLog)); AdvAssert.ThrowsInvalidOperation(() => presenter.DetailsVisible.ToString()); AdvAssert.ThrowsInvalidOperation(() => presenter.DetailsVisible = false); }
public void Stop_CloseHandleFails() { driver.Start(); fltLib.CloseHandleReturn = false; AdvAssert.ThrowsInvalidOperation(() => driver.Stop()); }
public void Paths_ExpandedPath_NotSupportedRegistryPaths() { var rs = new Ruleset(); var PathRow = rs.Paths.AddPathsRow("123"); var TestValues = new[] { @"HKEY_CURRENT_CONFIG\Software", @"HKCC\Software", @"HKEY_CLASSES_ROOT\._sln", @"HKCR\._sln", @"HKEY_DYN_DATA\123", @"HKDD\123", @"HKEY_PERFORMANCE_DATA\123", @"HKPD\123" }; foreach (var testValue in TestValues) { PathRow.Path = testValue; AdvAssert.ThrowsInvalidOperation(delegate { var p = PathRow.ExpandedPaths; }); } }
public void Start_AlreadyStarted() { driver.Start(); AdvAssert.ThrowsInvalidOperation(driver.Start); }
public void ReplyRequest_ToStopped() { AdvAssert.ThrowsInvalidOperation(() => driver.ReplyRequest(new ACCESS_REQUEST(), false)); }
public void GetRequest_FromStopped() { AdvAssert.ThrowsInvalidOperation(() => driver.GetRequest()); }
public void SendCommand_ToStopped() { AdvAssert.ThrowsInvalidOperation(() => driver.SendCommand(COMMAND_TYPE.ADD, @"C:\SomeFolder\somefile.txt", 0)); }
public void LastAllowedMessageID_Default() { AdvAssert.ThrowsInvalidOperation(() => stub.LastAllowedMessageID.ToString()); }
public void FilterReplyMessage_ZeroMessageID() { var permission = new PERMISSION(); AdvAssert.ThrowsInvalidOperation(() => stub.FilterReplyMessage(IntPtr.Zero, ref permission, 0)); }
public void Start_AlreadyStartedCore() { core.Start(ruleset, serviceInterface, null); AdvAssert.ThrowsInvalidOperation(() => core.Start(ruleset, serviceInterface, null)); }
public void WaitRequest_Stopped() { AdvAssert.ThrowsInvalidOperation(() => core.WaitRequest()); }
public void RefreshRules_WhenMainDisplayed() { _Form.ShowMain(); AdvAssert.ThrowsInvalidOperation(() => _Form.RefreshRules()); }