private void InitializeFixture()
 {
     this.target = new FleetStatistics(new[]
                                           {
                                               CalculateStatistics.Calculate(new[]
                                                                                 {
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-5),
                                                                                             Odometer = 1000,
                                                                                             Distance = null,
                                                                                             PricePerUnit = 1,
                                                                                             TotalUnits = 10,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-4),
                                                                                             Odometer = 2000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 1,
                                                                                             TotalUnits = 10,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-3),
                                                                                             Odometer = 3000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 1,
                                                                                             TotalUnits = 10,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-2),
                                                                                             Odometer = 4000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 1,
                                                                                             TotalUnits = 10,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-1),
                                                                                             Odometer = 5000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 1,
                                                                                             TotalUnits = 10,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                 }, includeFirst: false),
                                               CalculateStatistics.Calculate(new[]
                                                                                 {
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-6),
                                                                                             Odometer = 1000,
                                                                                             Distance = null,
                                                                                             PricePerUnit = 3,
                                                                                             TotalUnits = 20,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-5),
                                                                                             Odometer = 2000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 3,
                                                                                             TotalUnits = 20,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-3),
                                                                                             Odometer = 3000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 3,
                                                                                             TotalUnits = 20,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-3),
                                                                                             Odometer = 4000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 3,
                                                                                             TotalUnits = 20,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow,
                                                                                             Odometer = 5000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 3,
                                                                                             TotalUnits = 20,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                 }, includeFirst: false),
                                               CalculateStatistics.Calculate(new[]
                                                                                 {
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-12),
                                                                                             Odometer = 3000,
                                                                                             Distance = null,
                                                                                             PricePerUnit = 2,
                                                                                             TotalUnits = 30,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-10),
                                                                                             Odometer = 4000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 2,
                                                                                             TotalUnits = 30,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-8),
                                                                                             Odometer = 5000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 2,
                                                                                             TotalUnits = 30,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-6),
                                                                                             Odometer = 6000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 2,
                                                                                             TotalUnits = 30,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                     new FillupEntry
                                                                                         {
                                                                                             Date =
                                                                                                 DateTime.UtcNow.
                                                                                                 AddMonths(-4),
                                                                                             Odometer = 7000,
                                                                                             Distance = 1000,
                                                                                             PricePerUnit = 2,
                                                                                             TotalUnits = 30,
                                                                                             TransactionFee = 1.5
                                                                                         },
                                                                                 }, includeFirst: false)
                                           });
 }
        public void WhenConstructed_ThenInitializes()
        {
            var actual = new FleetStatistics(new VehicleStatisticsModel[0]);

            Assert.Equal(0.0, actual.AverageCostPerMonth);
            Assert.Equal(0.0, actual.AverageCostToDrive);
            Assert.Equal(0.0, actual.AverageFillupPrice);
            Assert.Equal(0.0, actual.AverageFuelEfficiency);
            Assert.Null(actual.Odometer);
            Assert.Equal(0.0, actual.TotalCost);
            Assert.Equal(0, actual.TotalDistance);
            Assert.Equal(0.0, actual.TotalFuelCost);
            Assert.Equal(0.0, actual.TotalUnits);
        }