public void SetLineup_AddTwoDogsAndOpen_ThenThreeSpots(Dog dog1, Dog dog2, Division division) { var heat = new Heat(); division.RacingClass = RacingClass.Open; heat.AddDogToLineup(division, dog1, dog2); heat.Lineup.ToList().Count.ShouldBe(3); }
public void SetLineup_AddTwoDogsAndRegular_ThenFourSpots(Dog dog1, Dog dog2, Division division) { var heat = new Heat(); division.RacingClass = RacingClass.Regular; heat.AddDogToLineup(division, dog1, dog2); heat.Lineup.ToList().Count.ShouldBe(4); }
public void SetLineup_AddOneDogsAndRegular_ThenThreeSpots(Dog dog1, Division division) { var heat = new Heat(); division.RacingClass = RacingClass.Regular; heat.AddDogToLineup(division, dog1); heat.Lineup.ToList().Count.ShouldBe(3); }
public void SetLineup_AddFourDogsAndOpen_ThenFiveSpots(Dog dog1, Dog dog2, Dog dog3, Dog dog4, Division division) { var heat = new Heat(); division.RacingClass = RacingClass.Open; heat.AddDogToLineup(division, dog1, dog2, dog3, dog4); heat.Lineup.ToList().Count.ShouldBe(5); }
public void AddStartTime_WhenDivisionNotReRunStartAndFault_ThenReturnsSameDog(Division division, Heat heat, Dog dog1, Dog dog2, Dog dog3, Dog dog4, Fault fault, double time) { division.RacingClass = RacingClass.Regular; heat.AddDogToLineup(division, dog1, dog2, dog3, dog4); fault = Fault.BadStart; var vut = heat.AddStartTime(dog1, time, fault, division); vut.Dog.ShouldBe(dog1); }
public void AddTime_AddThirdDog_ThenReturnsFourthDogInLineup(Division division, Heat heat, Dog dog1, Dog dog2, Dog dog3, Dog dog4, Fault fault, double time) { division.RacingClass = RacingClass.Regular; heat.AddDogToLineup(division, dog1, dog2, dog3, dog4); fault = null; var vut = heat.AddTime(dog3, Position.Third, time, fault, division); vut.Dog.ShouldBe(dog4); }
public void AddTime_WhenSecondDog_ThenReturnsSecondPosition(Division division, Heat heat, Dog dog1, Dog dog2, Dog dog3, Dog dog4, Fault fault, double time) { division.RacingClass = RacingClass.Regular; heat.AddDogToLineup(division, dog1, dog2, dog3, dog4); fault = null; var vut = heat.AddTime(dog2, Position.Second, time, fault, division); vut.Position.ShouldBe(Position.Third); }
public void AddStartTime_WhenDivisionNotRerunStartAndFault_ThenReturnsFirstPosition(Division division, Heat heat, Dog dog1, Dog dog2, Dog dog3, Dog dog4, Fault fault, double time) { division.RacingClass = RacingClass.Regular; heat.AddDogToLineup(division, dog1, dog2, dog3, dog4); fault = Fault.BadStart; division.RacingClass = RacingClass.Open; var vut = heat.AddStartTime(dog1, time, fault, division); vut.Position.ShouldBe(Position.First); }
public void SetLineup_AddTwoDogs_ThenDogsInRightOrder(Dog dog1, Dog dog2, Dog dog3, Dog dog4, Division division) { var heat = new Heat(); heat.AddDogToLineup(division, dog1, dog2, dog3, dog4); var firstDog = heat.Lineup.First(x => Equals(x.Position, Position.First)).Dog; var secondDog = heat.Lineup.First(x => Equals(x.Position, Position.Second)).Dog; firstDog.ShouldBe(dog1); secondDog.ShouldBe(dog2); }
public void SetLineup_AddOneDogs_ThenDogInFirstPosition(Dog dog1, Division division) { var heat = new Heat(); division.RacingClass = RacingClass.Open; heat.AddDogToLineup(division, dog1); var firstDog = heat.Lineup.First(x => x.Position == Position.First).Dog; firstDog.ShouldBe(dog1); }
public void SetLineup_AddFourDogs_ThenDogsInRightOrder(Dog dog1, Dog dog2, Dog dog3, Dog dog4, Division division) { var heat = new Heat(); division.RacingClass = RacingClass.Open; heat.AddDogToLineup(division, dog1, dog2, dog3, dog4); var firstDog = heat.Lineup.First(x => x.Position == Position.First).Dog; var secondDog = heat.Lineup.First(x => x.Position == Position.Second).Dog; var thirdDog = heat.Lineup.First(x => x.Position == Position.Third).Dog; var fourthDog = heat.Lineup.First(x => x.Position == Position.Fourth).Dog; firstDog.ShouldBe(dog1); secondDog.ShouldBe(dog2); thirdDog.ShouldBe(dog3); fourthDog.ShouldBe(dog4); }