public void WhenChildIsRunning_ContinueRunning() { var child = new MockBehaviour { ReturnStatus = BehaviourStatus.Running }; var sut = new AutoReset <MockContext>(child); sut.Tick(new MockContext()); Assert.That(child.ResetCount, Is.EqualTo(0)); }
public void OnTick_ShouldReturnChildStatus(BehaviourStatus status) { var child = new MockBehaviour { ReturnStatus = status }; var sut = new AutoReset <MockContext>(child); var behaviourStatus = sut.Tick(new MockContext()); Assert.That(behaviourStatus, Is.EqualTo(status)); }
public void WhenChildTerminates_ResetChild(BehaviourStatus status) { var child = new MockBehaviour { ReturnStatus = status }; var sut = new AutoReset <MockContext>(child); sut.Tick(new MockContext()); Assert.That(child.ResetCount, Is.EqualTo(1)); }