예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
        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);
        }
예제 #9
0
        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);
        }
예제 #10
0
        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);
        }
예제 #11
0
        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);
        }