示例#1
0
 public void SetUp()
 {
     _pointsSystem = MockRepository.GenerateMock<IPointsSystem>();
     CacheHelper.InvalidateAll();
 }
 public void SetUp()
 {
     _pointsSystem = new PointsSystem2010();
     CacheHelper.InvalidateAll();
 }
示例#3
0
        public static RaceEntry RaceEntry(IPointsSystem pointsSystem, int racePosition)
        {
            var first = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 1M, RacePlace = 1, QualifyingPosition = 1};
            var second = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 2M, RacePlace = 2, QualifyingPosition = 2 };
            var third = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 3M, RacePlace = 3, QualifyingPosition = 3 };
            var fourth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 4M, RacePlace = 4 , QualifyingPosition = 4};
            var fifth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 5M, RacePlace = 5, QualifyingPosition = 5};
            var sixth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 6M, RacePlace = 6, QualifyingPosition = 6};
            var seventh = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 7M, RacePlace = 7, QualifyingPosition = 7};
            var eighth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 8M, RacePlace = 8, QualifyingPosition = 8};
            var nineth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 9M, RacePlace = 9, QualifyingPosition = 9};
            var tenth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 10M, RacePlace = 10, QualifyingPosition = 10};
            var eleventh = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 11M, RacePlace = 11, QualifyingPosition = 11 };

            var race = FakesFactory.Race(new List<RaceEntry>() { first, second, third, fourth, fifth, sixth, seventh, eighth, nineth, tenth, eleventh });

            return race.Entries.Single(e => e.RacePlace == racePosition);
        }
示例#4
0
        public static RaceEntry RaceEntry(IPointsSystem pointsSystem, int racePosition, bool didNotFinish)
        {
            var first = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 1M, RacePlace = 1, DidNotFinish = didNotFinish };
            var second = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 2M, RacePlace = 2, DidNotFinish = didNotFinish };
            var third = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 3M, RacePlace = 3, DidNotFinish = didNotFinish };
            var fourth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 4M, RacePlace = 4, DidNotFinish = didNotFinish };
            var fifth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 5M, RacePlace = 5, DidNotFinish = didNotFinish };
            var sixth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 6M, RacePlace = 6, DidNotFinish = didNotFinish };
            var seventh = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 7M, RacePlace = 7, DidNotFinish = didNotFinish };
            var eighth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 8M, RacePlace = 8, DidNotFinish = didNotFinish };
            var nineth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 9M, RacePlace = 9, DidNotFinish = didNotFinish };
            var tenth = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 10M, RacePlace = 10, DidNotFinish = didNotFinish };
            var eleventh = new RaceEntry(pointsSystem) { Entrant = DriverContract(), QualifyingTime = 11M, RacePlace = 11, DidNotFinish = didNotFinish };

            var race = FakesFactory.Race(new List<RaceEntry>() { first, second, third, fourth, fifth, sixth, seventh, eighth, nineth, tenth, eleventh });

            return race.Entries.Single(e => e.RacePlace == racePosition);
        }
示例#5
0
        public static RaceEntry RaceEntry(IPointsSystem pointsSystem, bool didNotFinish)
        {
            var entry = new RaceEntry(pointsSystem) { Entrant = FakesFactory.DriverContract(), QualifyingTime = 72.21M, RacePlace = 1, DidNotFinish = didNotFinish };

            var race = FakesFactory.Race(new List<RaceEntry>() {entry});

            return entry;
        }
示例#6
0
 public static RaceEntry RaceEntry(IPointsSystem pointsSystem)
 {
     return RaceEntry(pointsSystem, false);
 }