public void FlattenedToCsvTest()
        {
            FlattenedSighting sighting  = _factory.Sightings.Get(a => a.Id == _sightingId).Flatten();
            string            csvRecord = sighting.ToCsv();
            Regex             regex     = new Regex(FlattenedSighting.CsvRecordPattern);
            bool matches = regex.Matches(csvRecord).Any();

            Assert.IsTrue(matches);
        }
        public void InflateFromCsvTest()
        {
            FlattenedSighting sighting  = _factory.Sightings.Get(a => a.Id == _sightingId).Flatten();
            string            csvRecord = sighting.ToCsv();
            FlattenedSighting inflated  = FlattenedSighting.FromCsv(csvRecord);

            Assert.AreEqual(sighting.FlightNumber, inflated.FlightNumber);
            Assert.AreEqual(sighting.Airline, inflated.Airline);
            Assert.AreEqual(sighting.Registration, inflated.Registration);
            Assert.AreEqual(sighting.SerialNumber, inflated.SerialNumber);
            Assert.AreEqual(sighting.Manufacturer, inflated.Manufacturer);
            Assert.AreEqual(sighting.Model, inflated.Model);
            Assert.AreEqual(sighting.Age, inflated.Age);
            Assert.AreEqual(sighting.Embarkation, inflated.Embarkation);
            Assert.AreEqual(sighting.Destination, inflated.Destination);
            Assert.AreEqual(sighting.Altitude, inflated.Altitude);
            Assert.AreEqual(sighting.Date, inflated.Date);
            Assert.AreEqual(sighting.Location, inflated.Location);
        }