public void FightWithTwoMixedParticipantsIsStarted() { _fight.AddParticipants(new List <IFightParticipant> { StubFightParticipant.AlliedFightParticipant(), StubFightParticipant.HostileFightParticipant() }); Assert.IsFalse(_fight.IsFinished()); }
public void FightWithOneHostileParticipantsEndsImmediately() { var participants = new List <IFightParticipant> { StubFightParticipant.HostileFightParticipant() }; _fight.AddParticipants(participants); Assert.IsTrue(_fight.IsFinished()); }
public void FightOrchestratorWithOneParticipantsReturnsThatParticipant() { var participant = new StubFightParticipant(); _orchestrator.AddParticipants(new List <IFightParticipant> { participant }); Assert.AreSame(participant, _orchestrator.GetNextActor()); }
public void FightWithMixedParticipantsWhereAlliesAreUnconsciousEnds() { var participants = new List <IFightParticipant> { StubFightParticipant.AlliedUnconsciousFightParticipant(), StubFightParticipant.HostileFightParticipant() }; _fight.AddParticipants(participants); Assert.IsTrue(_fight.IsFinished()); }
public void FightWithManyParticipantsReturnsThemInOrderFastestToSlowest() { var slower = new StubFightParticipant { initiative = 1 }; var faster = new StubFightParticipant { initiative = 2 }; _orchestrator.AddParticipants(new List <IFightParticipant> { slower, faster }); Assert.AreSame(faster, _orchestrator.GetNextActor()); Assert.AreSame(slower, _orchestrator.GetNextActor()); Assert.AreSame(faster, _orchestrator.GetNextActor()); Assert.AreSame(slower, _orchestrator.GetNextActor()); }
public void FightWithOnlyHostileParticipantsEndsImmediately() { _fight.AddParticipants(StubFightParticipant.HostileFightParticipants()); Assert.IsTrue(_fight.IsFinished()); }