Esempio n. 1
0
        public static Vehicle FromBytes(byte[] bytes)
        {
            var vehicle = new Vehicle();
            int curOffset = 0;
            string makeString = Encoding.Unicode.GetString(bytes, curOffset, MAKE_LENGTH);
            curOffset += MAKE_LENGTH;
            vehicle.Make = makeString.Replace("\0", string.Empty);

            string modelString = Encoding.Unicode.GetString(bytes, curOffset, MODEL_LENGTH);
            vehicle.Model = modelString.Replace("\0", string.Empty);
            curOffset += MODEL_LENGTH;

            string labelString = Encoding.Unicode.GetString(bytes, curOffset, LABEL_LENGTH);
            vehicle.VehicleName = labelString.Replace("\0", string.Empty);
            curOffset += LABEL_LENGTH;

            var yearBytes = new byte[sizeof (int)];
            Array.Copy(bytes, curOffset, yearBytes, 0, yearBytes.Length);
            vehicle.Year = BitConverter.ToInt32(yearBytes, 0);
            curOffset += sizeof (int);

            var odometerBytes = new byte[sizeof (byte)];
            Array.Copy(bytes, curOffset, odometerBytes, 0, odometerBytes.Length);
            vehicle.OdometerUnit = (UnitOfMeasure.Distance) odometerBytes[0];

            return vehicle;
        }
Esempio n. 2
0
        public void TestForArgumentExceptionBaselineOdometerReadingGreater()
        {
            var vehicle = new Vehicle {OdometerUnit = UnitOfMeasure.DefaultDistanceUnit};

            var entry1 = new FillupEntry
                             {
                                 OdometerReading = 100,
                                 FillAmount = 14.436,
                                 PricePerUnit = 2.799,
                                 PumpUnit = UnitOfMeasure.Volume.Liter,
                                 EntryDate = new DateTime(2010,10,1)
                             };

            var entry2 = new FillupEntry
                             {
                                 OdometerReading = 200,
                                 FillAmount = 14.436,
                                 PricePerUnit = 2.799,
                                 PumpUnit = UnitOfMeasure.Volume.Liter,
                                 EntryDate = new DateTime(2010,10,08)
                             };

            vehicle.Entries.Add(entry1);
            vehicle.Entries.Add(entry2);

            vehicle.CalculateEfficiency(entry1, entry2, UnitOfMeasure.DefaultDistanceUnit,
                                        UnitOfMeasure.DefaultVolumeUnit);
        }
Esempio n. 3
0
        public static void AssignId(Vehicle vehicle, int Id)
        {
            if(vehicle.Id != -1)
                throw new InvalidOperationException("Cannot call AssignId for a vehicle that has already been assigned an Id.");

            vehicle.Id = Id;
        }
Esempio n. 4
0
        public void SmokeTestUpdateEntry()
        {
            var vehicle = new Vehicle { VehicleName = "test vehicle" };
            Vehicle.Save(vehicle);

            var entry = new FillupEntry
            {
                EntryDate = DateTime.Now,
                FillAmount = 13.564,
                OdometerReading = 100215,
                PricePerUnit = 2.899
            };
            var originalTicks = entry.EntryDate.Ticks;

            vehicle.SaveEntry(entry);

            vehicle.Entries.Add(entry);

            entry.OdometerReading = 100210;

            vehicle.UpdateExistingEntry(entry, originalTicks);

            entry.EntryDate = new DateTime(2010,10,15);

            vehicle.UpdateExistingEntry(entry, originalTicks);
        }
Esempio n. 5
0
        public void OnAnalysisCacheInvalidated(Vehicle vehicle)
        {
            var vehiclePage = _vehiclePages.Where(page => page.Vehicle.Equals(vehicle))
                .SingleOrDefault();

            /*
             * since there is a static reference to this class in App.xaml.cs,
             * this method can fire even if the MainPage was never shown
             */
            if(vehiclePage != null) vehiclePage.IsSummaryCurrent = false;
        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            if (!_isNewInstance) return;

            string mode;
            NavigationContext.QueryString.TryGetValue("mode", out mode);
            _mode = (Mode)(Enum.Parse(typeof(Mode), mode, true));
            Vehicle viewModel;

            switch (_mode)
            {
                case Mode.New:
                    viewModel = new Vehicle {OdometerUnit = UnitOfMeasure.DefaultDistanceUnit};
                    break;

                case Mode.Edit:
                    string vehicleIdString;
                    NavigationContext.QueryString.TryGetValue("vehicleId", out vehicleIdString);
                    int vehicleId = int.Parse(vehicleIdString);
                    _originalVehicle = App.VehicleStore.Values
                        .Where(v => v.Id == vehicleId)
                        .Single();

                        //a quick and dirty way of cloning the vehicle
                        viewModel = Vehicle.FromBytes(Vehicle.ToBytes(_originalVehicle));
                    break;

                default:
                    throw new Exception("We should never get here.");
            }

            DataContext = viewModel;

            if (!State.ContainsKey("StatePreserved")) return;
            StateUtils.RestoreState(State, txtNameBasic, String.Empty);
            StateUtils.RestoreState(State, txtMake, String.Empty);
            StateUtils.RestoreState(State, txtNameAdvanced, String.Empty);
            StateUtils.RestoreState(State, txtYear, String.Empty);
            StateUtils.RestoreState(State, optMiles, UnitOfMeasure.DefaultDistanceUnit == UnitOfMeasure.Distance.Mile);
            StateUtils.RestoreState(State, optKilometers, UnitOfMeasure.DefaultDistanceUnit == UnitOfMeasure.Distance.Kilometer);
            AddVehiclePivot.SelectedIndex = State["CurPivotItem"] as string == "basic" ? 0 : 1;
        }
Esempio n. 7
0
        public void TestDeleteEntry()
        {
            var vehicle = new Vehicle {VehicleName = "test vehicle"};
            Vehicle.Save(vehicle);

            var entry = new FillupEntry
                            {
                                EntryDate = DateTime.Now,
                                FillAmount = 13.564,
                                OdometerReading = 100215,
                                PricePerUnit = 2.899
                            };

            vehicle.Entries.Add(entry);
            vehicle.SaveEntry(entry);

            vehicle.DeleteFillupEntry(entry);

            using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
            {
                Assert.IsFalse(store.FileExists(vehicle.Id + "\\" + entry.OdometerReading));
            }
        }
Esempio n. 8
0
        public static void DeleteVehicle(Vehicle vehicle)
        {
            if(!VehicleStore.ContainsKey(vehicle.Id))
                throw new InvalidOperationException("Vehicle must exist in vehicle store.");

            VehicleStore.Remove(vehicle.Id);
            if(__analysisCache.ContainsKey(vehicle)) __analysisCache.Remove(vehicle);
            if(__analysisCache.ContainsKey(vehicle)) __analysisCacheIsStale.Remove(vehicle);

            using(var store = IsolatedStorageFile.GetUserStoreForApplication())
            {
                Util.RecursiveDeleteDirectory(vehicle.Id.ToString(), store);
            }

            MainViewModel.VehiclePages.Remove(MainViewModel.VehiclePages
                .Where(vp => vp.Vehicle.Equals(vehicle)).Single());

            if(vehicle == MainViewModel.SelectedVehicle)
            {
                MainViewModel.SelectedVehicle = VehicleStore.Count > 0
                                                    ? VehicleStore.Values.First()
                                                    : null;
            }
        }
Esempio n. 9
0
        public void TestDeleteEntryNotAssociatedWithVehicle()
        {
            var vehicle = new Vehicle {VehicleName = "test vehicle"};
            Vehicle.Save(vehicle);

            var entry = new FillupEntry
                            {
                                EntryDate = DateTime.Now,
                                FillAmount = 13.564,
                                OdometerReading = 100215,
                                PricePerUnit = 2.899
                            };

            vehicle.SaveEntry(entry);

            vehicle.DeleteFillupEntry(entry);
        }
Esempio n. 10
0
        public static VehicleAnalysis GetVehicleAnalysis(Vehicle vehicle)
        {
            Debug.WriteLine("GetVehicleAnalysis({0}) called", vehicle.VehicleName);
            if (!__analysisCache.ContainsKey(vehicle))
            {
                Debug.WriteLine("Analysis doesn't exist in the dict, generating and adding it.");
                __analysisCache.Add(vehicle,
                                    vehicle.GenerateVehicleAnalysis(UnitOfMeasure.DefaultDistanceUnit,
                                                                    UnitOfMeasure.DefaultVolumeUnit));

                if (!__analysisCacheIsStale.ContainsKey(vehicle))
                    __analysisCacheIsStale.Add(vehicle, false);
                else
                    __analysisCacheIsStale[vehicle] = false;

                return __analysisCache[vehicle];
            }

            if (__analysisCacheIsStale[vehicle])
            {
                Debug.WriteLine("Analysis for {0} is stale.  Regenerating.", vehicle.VehicleName);
                __analysisCache[vehicle] = vehicle.GenerateVehicleAnalysis(UnitOfMeasure.DefaultDistanceUnit,
                                                                           UnitOfMeasure.DefaultVolumeUnit);
                __analysisCacheIsStale[vehicle] = false;
            }

            return __analysisCache[vehicle];
        }
Esempio n. 11
0
        public void TestUpdateEntryThrowsArgumentExceptionEntryMustBelongToVehicle()
        {
            var vehicle = new Vehicle { VehicleName = "test vehicle" };
            Vehicle.Save(vehicle);

            var entry = new FillupEntry
            {
                EntryDate = DateTime.Now,
                FillAmount = 13.564,
                OdometerReading = 100215,
                PricePerUnit = 2.899
            };
            var originalTicks = entry.EntryDate.Ticks;

            vehicle.SaveEntry(entry);

            entry.OdometerReading = 100210;

            vehicle.UpdateExistingEntry(entry, originalTicks);
        }
Esempio n. 12
0
        public static Vehicle SampleVehicle()
        {
            var honda = new Vehicle
                            {
                                Make = "Sample",
                                Model = "Vehicle",
                                Year = 2005,
                                OdometerUnit = UnitOfMeasure.DefaultDistanceUnit,
                                VehicleName = "sample car"
                            };

            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,9,28),
            //                          FillAmount = 14.136,
            //                          PricePerUnit = 2.759,
            //                          OdometerReading = 1008,
            //                          OdometerUnit = honda.OdometerUnit,
            //
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,9,30),
            //                          FillAmount = 17.513,
            //                          PricePerUnit = 2.999,
            //                          OdometerReading = 1385,
            //                          OdometerUnit = honda.OdometerUnit,
            //
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,9,30).AddMilliseconds(5000),
            //                          FillAmount = 7,
            //                          PricePerUnit = 2.999,
            //                          OdometerReading = 1548,
            //                          OdometerUnit = honda.OdometerUnit,
            //
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,10,16),
            //                          FillAmount = 11.62,
            //                          PricePerUnit = 2.659,
            //                          OdometerReading = 1780,
            //                          OdometerUnit = honda.OdometerUnit,
            //
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,11,5),
            //                          FillAmount = 15.002,
            //                          PricePerUnit = 2.399,
            //                          OdometerReading = 2127,
            //                          OdometerUnit = honda.OdometerUnit,
            //
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,11,7),
            //                          FillAmount = 16.334,
            //
            //                          PricePerUnit = 2.199,
            //                          OdometerReading = 2519,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,11,9),
            //                          FillAmount = 11.589,
            //                          PricePerUnit = 2.389,
            //
            //                          OdometerReading = 2755,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,11,17),
            //                          FillAmount = 13.684,
            //                          PricePerUnit = 2.229,
            //
            //                          OdometerReading = 3009,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,11,29),
            //                          FillAmount = 17.254,
            //                          PricePerUnit = 2.199,
            //                          OdometerReading = 3336,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2005,12,31),
            //                          FillAmount = 18.18,
            //                          PricePerUnit = 2.299,
            //                          OdometerReading = 3644,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,01,06),
            //                          FillAmount = 14.84,
            //                          PricePerUnit = 2.399,
            //                          OdometerReading = 3977,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,01,17),
            //                          FillAmount = 10.41,
            //                          PricePerUnit = 2.359,
            //                          OdometerReading = 4175,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,01,24),
            //                          FillAmount = 16.575,
            //                          PricePerUnit = 2.359,
            //
            //                          OdometerReading = 4534,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,02,01),
            //                          FillAmount = 19.36,
            //                          PricePerUnit = 2.349,
            //
            //                          OdometerReading = 4901,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,02,18),
            //                          FillAmount = 13.998,
            //                          PricePerUnit = 2.299,
            //
            //                          OdometerReading = 5151,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,02,19),
            //                          FillAmount = 17.649,
            //                          PricePerUnit = 2.299,
            //
            //                          OdometerReading = 5525,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,04,04),
            //                          FillAmount = 16.497,
            //                          PricePerUnit = 2.659,
            //
            //                          OdometerReading = 5803,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,04,16),
            //                          FillAmount = 19.235,
            //                          PricePerUnit = 2.799,
            //
            //                          OdometerReading = 6170,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,04,22),
            //                          FillAmount = 16.47,
            //                          PricePerUnit = 2.899,
            //
            //                          OdometerReading = 6553,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,05,09),
            //                          FillAmount = 17.442,
            //                          PricePerUnit = 2.849,
            //                          OdometerReading = 6952,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,05,23),
            //                          FillAmount = 15.108,
            //                          PricePerUnit = 2.859,
            //                          OdometerReading = 7215,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,06,07),
            //                          FillAmount = 18,
            //                          PricePerUnit = 2.939,
            //
            //                          OdometerReading = 7559,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,06,11),
            //                          FillAmount = 18.190,
            //
            //                          PricePerUnit = 2.959,
            //                          OdometerReading = 7980,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,07,09),
            //                          FillAmount = 14.838,
            //
            //                          PricePerUnit = 3.079,
            //                          OdometerReading = 8317,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,07,19),
            //                          FillAmount = 15.151,
            //                          PricePerUnit = 3.079,
            //
            //                          OdometerReading = 8654,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,08,06),
            //                          FillAmount = 17.766,
            //                          PricePerUnit = 3.299,
            //
            //                          OdometerReading = 9009,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,08,06).AddMilliseconds(10),
            //                          FillAmount = 11.202,
            //                          PricePerUnit = 3.299,
            //
            //                          OdometerReading = 9209,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,08,09),
            //                          FillAmount = 13.486,
            //                          PricePerUnit = 3.149,
            //
            //                          OdometerReading = 9521,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,08,12),
            //                          FillAmount = 18.326,
            //                          PricePerUnit = 3.139,
            //
            //                          OdometerReading = 9855,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,08,16),
            //                          FillAmount = 8.584,
            //                          PricePerUnit = 3.129,
            //
            //                          OdometerReading = 10000,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,09,08),
            //                          FillAmount = 17.724,
            //                          PricePerUnit = 2.699,
            //
            //                          OdometerReading = 10391,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,09,19),
            //                          FillAmount = 18.003,
            //                          PricePerUnit = 2.479,
            //
            //                          OdometerReading = 10714,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,09,29),
            //                          FillAmount = 13.803,
            //                          PricePerUnit = 2.359,
            //
            //                          OdometerReading = 11013,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,10,01),
            //                          FillAmount = 15.663,
            //                          PricePerUnit = 2.329,
            //
            //                          OdometerReading = 11385,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,10,08),
            //                          FillAmount = 16.4,
            //                          PricePerUnit = 2.256,
            //                          OdometerReading = 11749,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,10,20),
            //                          FillAmount = 16.674,
            //                          PricePerUnit = 2.259,
            //                          OdometerReading = 12070,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,11,4),
            //                          FillAmount = 14.084,
            //                          PricePerUnit = 2.259,
            //
            //                          OdometerReading = 12325,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,11,17),
            //                          FillAmount = 15.536,
            //
            //                          PricePerUnit = 2.259,
            //                          OdometerReading = 12645,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,11,29),
            //                          FillAmount = 18.16,
            //                          PricePerUnit = 2.259,
            //
            //                          OdometerReading = 12986,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,11,30),
            //                          FillAmount = 10.174,
            //                          PricePerUnit = 2.259,
            //
            //                          OdometerReading = 13207,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2006,12,24),
            //                          FillAmount = 16.710,
            //                          PricePerUnit = 2.359,
            //
            //                          OdometerReading = 13507,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,01,01),
            //                          FillAmount = 11.230,
            //                          PricePerUnit = 2.279,
            //
            //                          OdometerReading = 13708,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,01,08),
            //                          FillAmount = 16.333,
            //
            //                          PricePerUnit = 2.299,
            //                          OdometerReading = 14089,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,01,26),
            //                          FillAmount = 14.37,
            //
            //                          PricePerUnit = 2.159,
            //                          OdometerReading = 14330,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,02,11),
            //                          FillAmount = 9.228,
            //                          PricePerUnit = 2.269,
            //
            //                          OdometerReading = 14486,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,02,12),
            //                          FillAmount = 16.341,
            //
            //                          PricePerUnit = 2.249,
            //                          OdometerReading = 14868,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,03,16),
            //                          FillAmount = 17.696,
            //
            //                          PricePerUnit = 2.499,
            //                          OdometerReading = 15159,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,04,07),
            //                          FillAmount = 17.863,
            //                          PricePerUnit = 2.799,
            //
            //                          OdometerReading = 15499,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,04,08),
            //                          FillAmount = 10.141,
            //                          PricePerUnit = 2.759,
            //                          OdometerReading = 15738,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,04,19),
            //                          FillAmount = 17.86,
            //                          PricePerUnit = 2.799,
            //                          OdometerReading = 16124,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,05,11),
            //                          FillAmount = 16.411,
            //                          PricePerUnit = 3.199,
            //                          OdometerReading = 16438,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,05,18),
            //                          FillAmount = 11.683,
            //                          PricePerUnit = 3.299,
            //                          OdometerReading = 16657,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,05,19),
            //                          FillAmount = 8.541,
            //                          PricePerUnit = 3.399,
            //                          OdometerReading = 16830,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,06,14),
            //                          FillAmount = 18.643,
            //                          PricePerUnit = 3.129,
            //
            //                          OdometerReading = 17270,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,07,01),
            //                          FillAmount = 17.615,
            //                          PricePerUnit = 3.039,
            //
            //                          OdometerReading = 17638,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,07,14),
            //                          FillAmount = 17.539,
            //
            //                          PricePerUnit = 3.199,
            //                          OdometerReading = 17992,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,07,23),
            //                          FillAmount = 16.787,
            //                          PricePerUnit = 3.189,
            //
            //                          OdometerReading = 18290,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,07,24),
            //                          FillAmount = 15.301,
            //                          PricePerUnit = 3.179,
            //
            //                          OdometerReading = 18570,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,07,29),
            //                          FillAmount = 18.109,
            //
            //                          PricePerUnit = 2.969,
            //                          OdometerReading = 18982,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,07,31),
            //                          FillAmount = 15.178,
            //                          PricePerUnit = 2.999,
            //
            //                          OdometerReading = 19236,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,08,04),
            //                          FillAmount = 17,
            //                          PricePerUnit = 2.999,
            //
            //                          OdometerReading = 19552,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,08,11),
            //                          FillAmount = 18.285,
            //
            //                          PricePerUnit = 2.859,
            //                          OdometerReading = 19861,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,08,24),
            //                          FillAmount = 15.873,
            //
            //                          PricePerUnit = 3.099,
            //                          OdometerReading = 20218,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,09,01),
            //                          FillAmount = 14.878,
            //                          PricePerUnit = 3.059,
            //
            //                          OdometerReading = 20481,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,09,13),
            //                          FillAmount = 17.605,
            //                          PricePerUnit = 2.939,
            //                          OdometerReading = 20847,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,09,23),
            //                          FillAmount = 18.002,
            //                          PricePerUnit = 2.919,
            //
            //                          OdometerReading = 21179,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,10,13),
            //                          FillAmount = 18.703,
            //                          PricePerUnit = 2.969,
            //
            //                          OdometerReading = 21554,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,11,09),
            //                          FillAmount = 17.896,
            //                          PricePerUnit = 3.159,
            //                          OdometerReading = 21866,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,11,16),
            //                          FillAmount = 14,
            //                          PricePerUnit = 3.219,
            //                          OdometerReading = 22172,
            //
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,12,09),
            //                          FillAmount = 17.978,
            //                          PricePerUnit = 2.999,
            //
            //                          OdometerReading = 22499,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,12,15),
            //                          FillAmount = 14.851,
            //
            //                          PricePerUnit = 2.989,
            //                          OdometerReading = 22785,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,12,21),
            //                          FillAmount = 14.951,
            //
            //                          PricePerUnit = 2.979,
            //                          OdometerReading = 23085,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2007,12,29),
            //                          FillAmount = 9.775,
            //
            //                          PricePerUnit = 3.099,
            //                          OdometerReading = 23242,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2008,01,01),
            //                          FillAmount = 17.976,
            //
            //                          PricePerUnit = 3.099,
            //                          OdometerReading = 23649,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            //honda.Entries.Add(new FillupEntry
            //                      {
            //                          EntryDate = new DateTime(2008,01,11),
            //                          FillAmount = 15.735,
            //                          PricePerUnit = 3.099,
            //
            //                          OdometerReading = 23952,
            //                          OdometerUnit = honda.OdometerUnit,
            //                          PumpUnit = UnitOfMeasure.DefaultVolumeUnit
            //                      });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,12),
                                      FillAmount = 16.674,

                                      PricePerUnit = 2.999,
                                      OdometerReading = 24324,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,12).AddMilliseconds(20),
                                      FillAmount = 16.286,

                                      PricePerUnit = 3.099,
                                      OdometerReading = 24669,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,13),
                                      FillAmount = 12.096,

                                      PricePerUnit = 2.959,
                                      OdometerReading = 24997,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,17),
                                      FillAmount = 17.972,

                                      PricePerUnit = 2.949,
                                      OdometerReading = 25356,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,17).AddMilliseconds(20),
                                      FillAmount = 17.246,

                                      PricePerUnit = 2.899,
                                      OdometerReading = 25697,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,17).AddMilliseconds(40),
                                      FillAmount = 18.004,

                                      PricePerUnit = 2.899,
                                      OdometerReading = 26080,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,19),
                                      FillAmount = 16.18,

                                      PricePerUnit = 3.099,
                                      OdometerReading = 26428,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,20),
                                      FillAmount = 15.494,
                                      PricePerUnit = 2.999,

                                      OdometerReading = 26736,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,01,21),
                                      FillAmount = 15.077,
                                      PricePerUnit = 2.999,

                                      OdometerReading = 27029,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,02,20),
                                      FillAmount = 15.19,
                                      PricePerUnit = 2.959,

                                      OdometerReading = 27266,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,02,22),
                                      FillAmount = 16.251,

                                      PricePerUnit = 3.075,
                                      OdometerReading = 27539,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,03,17),
                                      FillAmount = 17.556,

                                      PricePerUnit = 3.299,
                                      OdometerReading = 27856,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,03,23),
                                      FillAmount = 17.16,

                                      PricePerUnit = 3.299,
                                      OdometerReading = 28207,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,04,05),
                                      FillAmount = 15.862,

                                      PricePerUnit = 3.339,
                                      OdometerReading = 28536,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,04,17),
                                      FillAmount = 7.199,
                                      PricePerUnit = 3.479,

                                      OdometerReading = 28680,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            honda.Entries.Add(new FillupEntry
                                  {
                                      EntryDate = new DateTime(2008,04,22),
                                      FillAmount = 16.8,

                                      PricePerUnit = 3.659,
                                      OdometerReading = 29017,
                                      OdometerUnit = honda.OdometerUnit,
                                      PumpUnit = UnitOfMeasure.DefaultVolumeUnit
                                  });
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,05,10), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,05,25), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,06,19), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,06,21), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,06,28), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,06,28).AddMilliseconds(20), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,07,03), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,07,17), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,07,23), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,08,23), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,10,11), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,10,22), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,11,12), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,11,16), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,11,23), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,11,29), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,11,30), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,12,09), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,12,17), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2008,12,19), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,01,02), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,01,04), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,01,09), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,01,16), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,01,23), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,02,10), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,02,22), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,02,25), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,03,10), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,03,14), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,03,18), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,03,25), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,03,30), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,04,11), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,04,12), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,05,01), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,05,17), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,05,30), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,06,13), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,06,15), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,06,29), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,07,01), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,07,07), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,07,09), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,07,12), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,07,19), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,07,30), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,08,07), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,08,08), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,08,20), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,09,21), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,09,29), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,10,04), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,10,04).AddMilliseconds(10), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,10,16), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,10,18), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,10,24), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,10,29), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,11,05), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,11,16), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,11,20), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,12,07), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,12,23), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,12,27), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2009,12,31), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,01,13), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,01,15), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,02,09), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,02,23), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,03,09), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,03,16), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,03,29), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,04,04), PreviousEntryMissed = true, FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,04,04).AddMilliseconds(20), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,04,15), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,04,16), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,04,22), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,04,28), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,05,08), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,05,15), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,05,31), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,06,15), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,06,19), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,06,25), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,03), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,03).AddMilliseconds(20), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,03).AddMilliseconds(40), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,21), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,23), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,29), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,31), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,07,31).AddMilliseconds(20), WasNotToppedOff = true, FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,02), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,02).AddMilliseconds(20), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,02).AddMilliseconds(40), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,06), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,07), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,14), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,19), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,21), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});
            //honda.Entries.Add(new FillupEntry { EntryDate = new DateTime(2010,08,28), FillAmount = , PricePerUnit = , OdometerDistanceUnit = honda.OdometerDistanceUnit, OdometerReading = , OdometerDistanceUnit = honda.OdometerUnit, PumpVolumeUnit = UnitOfMeasure.Volume.Gallon});

            foreach (FillupEntry entry in honda.Entries)
            {
                entry.PumpUnit = UnitOfMeasure.DefaultVolumeUnit;
            }
            return honda;
        }
Esempio n. 13
0
        public void TestNotEnoughSampleDataTwoEntriesWasNotToppedOff()
        {
            var vehicle = new Vehicle {OdometerUnit = UnitOfMeasure.DefaultDistanceUnit};

            var entry1 = new FillupEntry
                             {
                                 OdometerReading = 100,
                                 FillAmount = 14.436,
                                 PricePerUnit = 2.799,
                                 PumpUnit = UnitOfMeasure.Volume.Liter,
                                 EntryDate = new DateTime(2010,10,1)
                             };

            var entry2 = new FillupEntry
                             {
                                 OdometerReading = 200,
                                 FillAmount = 14.436,
                                 PricePerUnit = 2.799,
                                 PumpUnit = UnitOfMeasure.Volume.Liter,
                                 EntryDate = new DateTime(2010,10,08),
                                 WasNotToppedOff = true
                             };

            vehicle.Entries.Add(entry1);
            vehicle.Entries.Add(entry2);

            vehicle.CalculateEfficiency(entry2, entry1, UnitOfMeasure.DefaultDistanceUnit,
                                        UnitOfMeasure.DefaultVolumeUnit);
        }
Esempio n. 14
0
        public void TestVehicleSerializationAndDeserialization()
        {
            var vehicle = new Vehicle
                              {
                                  Year = 1995,
                                  Make = "Honda",
                                  Model = "Accord",
                                  VehicleName = "'05 Honda Accord",
                                  OdometerUnit = UnitOfMeasure.Distance.Mile
                              };

            byte[] vehicleBytes = Vehicle.ToBytes(vehicle);
            Vehicle vehicle2 = Vehicle.FromBytes(vehicleBytes);

            Assert.AreEqual(vehicle.Year, vehicle2.Year);
            Assert.AreEqual(vehicle.Make, vehicle2.Make);
            Assert.AreEqual(vehicle.Model, vehicle2.Model);
            Assert.AreEqual(vehicle.VehicleName, vehicle2.VehicleName);
            Assert.AreEqual(vehicle.OdometerUnit, vehicle2.OdometerUnit);
        }
Esempio n. 15
0
        public void TestInsertEntryOdometerLessThanEarlierDate()
        {
            var vehicle = new Vehicle {OdometerUnit = UnitOfMeasure.DefaultDistanceUnit};
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,1,1),
                                        OdometerReading = 100,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,1,15),
                                        OdometerReading = 200,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,1,30),
                                        OdometerReading = 300,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,2,1),
                                        OdometerReading = 400,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,2,15),
                                        OdometerReading = 500,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });

            var entry = new FillupEntry
                            {
                                EntryDate = new DateTime(2010,1,20),
                                OdometerReading = 50,
                                FillAmount = 10,
                                OdometerUnit = vehicle.OdometerUnit
                            };

            vehicle.InsertEntry(entry);
        }
Esempio n. 16
0
        public static void Save(Vehicle vehicle, int id = -1)
        {
            Debug.Assert(!String.IsNullOrEmpty(vehicle.VehicleName.Trim()), "The vehicle's VehicleName property cannot be empty.");

            if (App.VehicleStore.Values.Any(v => v.Id != vehicle.Id && v.VehicleName.Equals(vehicle.VehicleName)))
                throw new DuplicateVehicleLabelException("A vehicle already exists with this label.");

            using (var store = IsolatedStorageFile.GetUserStoreForApplication())
            {
                //determine a new id for the vehicle if it's new
                if (id == -1)
                {
                    while (store.DirectoryExists((++id).ToString())){}
                    store.CreateDirectory(id.ToString());
                }

                vehicle.Id = id;
                string fileName = id + @"\vehicle";
                Debug.WriteLine("Saving '{0}' to file '{1}'", vehicle.VehicleName, fileName);
                using (var fileWriter = store.CreateFile(fileName))
                {
                    byte[] bytes = ToBytes(vehicle);
                    fileWriter.Write(bytes, 0, bytes.Length);
                }
            }
        }
Esempio n. 17
0
        public static byte[] ToBytes(Vehicle vehicle)
        {
            var vehicleBytes =
                new byte[VEHICLE_SIZE];

            int curOffset = 0;

            byte[] makeBytes = vehicle.Make != null
                                   ? Encoding.Unicode.GetBytes(vehicle.Make.Trim())
                                   : new byte[MAKE_LENGTH];

            Array.Copy(makeBytes, 0, vehicleBytes, curOffset,
                       makeBytes.Length < MAKE_LENGTH ? makeBytes.Length : MAKE_LENGTH);
            curOffset += MAKE_LENGTH;

            byte[] modelBytes = vehicle.Model != null
                                    ? Encoding.Unicode.GetBytes(vehicle.Model.Trim())
                                    : new byte[MODEL_LENGTH];

            Array.Copy(modelBytes, 0, vehicleBytes, curOffset,
                       modelBytes.Length < MODEL_LENGTH ? modelBytes.Length : MODEL_LENGTH);

            curOffset += MODEL_LENGTH;

            byte[] labelBytes = Encoding.Unicode.GetBytes(vehicle.VehicleName.Trim());
            Array.Copy(labelBytes, 0, vehicleBytes, curOffset,
                       labelBytes.Length < LABEL_LENGTH ? labelBytes.Length : LABEL_LENGTH);

            curOffset += LABEL_LENGTH;

            Array.Copy(BitConverter.GetBytes(vehicle.Year), 0, vehicleBytes, curOffset, sizeof (int));
            curOffset += sizeof (int);

            Array.Copy(new[] {(byte) vehicle.OdometerUnit}, 0, vehicleBytes, curOffset, sizeof (byte));

            return vehicleBytes;
        }
Esempio n. 18
0
 public void TestVehicleConstruction()
 {
     var vehicle = new Vehicle();
     Assert.IsNotNull(vehicle.Entries);
 }
        public static void Validate(this FillupEntry entry, Vehicle vehicle)
        {
            Debug.Assert(entry.OdometerUnit == vehicle.OdometerUnit,
                         "entry odometer unit must equal vehicle odometer unit.");
            Debug.Assert(entry.EntryDate != default(DateTime));

            if (entry.EntryDate > DateTime.Now)
                throw new PetroledgerValidationException("The entry date cannot be in the future.");

            if (entry.OdometerReading == -1)
                throw new PetroledgerValidationException("The odometer reading entered is not valid.");

            if (entry.OdometerReading <= 0)
                throw new PetroledgerValidationException("The odometer reading must be greater than 0.");

            if (entry.FillAmount == -1)
                throw new PetroledgerValidationException("The fill amount entered is not valid.");

            if (entry.FillAmount <= 0)
                throw new PetroledgerValidationException("The fill amount must be greater than 0.");

            if (entry.PricePerUnit == -1)
                throw new PetroledgerValidationException("The price entered is not valid.");

            if (entry.PricePerUnit <= 0)
                throw new PetroledgerValidationException("The price must be greater than 0.");

            if (entry.EntryDate > DateTime.Now)
            {
                throw new PetroledgerValidationException("Entry date cannot be in the future.");
            }

            FillupEntry previousEntry =
                vehicle.Entries
                    .Where(e => e.EntryDate < entry.EntryDate)
                    .OrderByDescending(e => e.EntryDate)
                    .FirstOrDefault();

            FillupEntry subsequentEntry =
                vehicle.Entries.Where(e => e.EntryDate > entry.EntryDate)
                    .OrderBy(e => e.EntryDate)
                    .FirstOrDefault();

            if (previousEntry != null && previousEntry.OdometerReading > entry.OdometerReading)
                throw new PetroledgerValidationException(
                    String.Format(
                        "An entry from {0:d} has an odometer reading of {1}.  The odometer reading must be greater than {1}.",
                        previousEntry.EntryDate, previousEntry.OdometerReading));

            if (subsequentEntry != null && subsequentEntry.OdometerReading < entry.OdometerReading)
                throw new PetroledgerValidationException(
                    String.Format(
                        "An entry from {0:d} has an odometer reading of {1}.  The odometer reading must be less than {1}.",
                        subsequentEntry.EntryDate, subsequentEntry.OdometerReading));
        }
Esempio n. 20
0
        public void TestInsertEntry()
        {
            var vehicle = new Vehicle {OdometerUnit = UnitOfMeasure.DefaultDistanceUnit};
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,1,1),
                                        OdometerReading = 100,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,1,15),
                                        OdometerReading = 200,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,1,30),
                                        OdometerReading = 300,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,2,1),
                                        OdometerReading = 400,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });
            vehicle.Entries.Add(new FillupEntry
                                    {
                                        EntryDate = new DateTime(2010,2,15),
                                        OdometerReading = 500,
                                        FillAmount = 10,
                                        OdometerUnit = vehicle.OdometerUnit
                                    });

            var entry = new FillupEntry
                            {
                                EntryDate = new DateTime(2009,12,20),
                                OdometerReading = 50,
                                FillAmount = 10,
                                OdometerUnit = vehicle.OdometerUnit
                            };

            vehicle.InsertEntry(entry);
            Assert.IsTrue(vehicle.Entries.IndexOf(entry) == 0);

            entry = new FillupEntry
                        {
                            EntryDate = new DateTime(2010,2,28),
                            OdometerReading = 600,
                            FillAmount = 10,
                            OdometerUnit = vehicle.OdometerUnit
                        };

            vehicle.InsertEntry(entry);
            Assert.IsTrue(vehicle.Entries.IndexOf(entry) == vehicle.Entries.Count - 1);

            entry = new FillupEntry
                        {
                            EntryDate = new DateTime(2009,12,25),
                            OdometerReading = 75,
                            FillAmount = 10,
                            OdometerUnit = vehicle.OdometerUnit
                        };

            vehicle.InsertEntry(entry);
            Assert.IsTrue(vehicle.Entries.IndexOf(entry) == 1);
        }
Esempio n. 21
0
 public static void InvalidateAnalysisCache(Vehicle vehicle)
 {
     __analysisCacheIsStale[vehicle] = true;
     if (AnalysisCacheInvalidated == null) return;
     AnalysisCacheInvalidated(vehicle);
 }