public void ActionFailsOnServiceSpecificName() { WinServiceAction controlServiceAction = new WinServiceAction() { Status = 1, Wait = false, WaitTimeout = 0 }; var actionResult = controlServiceAction.Execute(ArgumentCollection.New()); Assert.IsNotNull(actionResult); Assert.IsFalse(actionResult.Result); Assert.IsNotNull(actionResult.AttachedException); }
public void ActionFailsOnWrongStatusToAct() { WinServiceAction controlServiceAction = new WinServiceAction() { ServiceName = "YOUNESCHEIKH", Status = 28, Wait = false, WaitTimeout = 0 }; var actionResult = controlServiceAction.Execute(ArgumentCollection.New()); Assert.IsNotNull(actionResult); Assert.IsFalse(actionResult.Result); Assert.IsNotNull(actionResult.AttachedException); }