public void BoxWithOneCmdAndEmptyConditions_OnForceStartJob_ShouldHaveAllChildrenActivated() { // arrange var mainBox = new BoxJob { Name = "MainBox" }; var childBox = new BoxJob { Name = "ChildBox" }; var grandChildCmd = new CmdJob { Name = "Child" }; mainBox.ChildJobs.Add(childBox); childBox.ChildJobs.Add(grandChildCmd); var eventProcessor = new EventProcessor(); // act eventProcessor.ProcessEvent(mainBox, Event.ForceStartJob); // assert Assert.That(mainBox.Status, Is.EqualTo(Status.Running)); Assert.That(childBox.Status, Is.EqualTo(Status.Activated)); Assert.That(grandChildCmd.Status, Is.EqualTo(Status.Activated)); }
public void NewCmdJob_ShouldHaveInaciveState() { // arrange var c = new CmdJob { Name = "Cmd" }; // assert Assert.That(c.Status, Is.EqualTo(Status.Inactive)); }