public void ItDoesntCrashIfNobodyIsListeningForDoneWaiting() { var unity = Substitute.For <UnityObject>(); var conflictResolver = Substitute.For <ConflictResolver>(); var unit = new StandardUnit(conflictResolver, unity); unit.NotReadyForCommand(); }
public void ItDoesntCrashIfNobodyIsListeningForDoneWaiting() { var unity = Substitute.For<UnityObject>(); var conflictResolver = Substitute.For<ConflictResolver>(); var unit = new StandardUnit(conflictResolver, unity); unit.NotReadyForCommand(); }
public void ItFiresDoneWaitingWhenNotReadyForACommand() { var unity = Substitute.For<UnityObject>(); var conflictResolver = Substitute.For<ConflictResolver>(); var unit = new StandardUnit(conflictResolver, unity); bool doneWaiting = false; unit.DoneWaiting += () => doneWaiting = true; unit.NotReadyForCommand(); Assert.IsTrue(doneWaiting); }
public void ItFiresDoneWaitingWhenNotReadyForACommand() { var unity = Substitute.For <UnityObject>(); var conflictResolver = Substitute.For <ConflictResolver>(); var unit = new StandardUnit(conflictResolver, unity); bool doneWaiting = false; unit.DoneWaiting += () => doneWaiting = true; unit.NotReadyForCommand(); Assert.IsTrue(doneWaiting); }