public void TestFlagsValidity()
 {
     _logger.WriteLine("Testing card validity...");
     _connection.Open();
     try
     {
         var invalidFlags = EcCard.LoadAll(_connection)
                            .Where(c => !c.IsFlagsValid)
                            .ToList();
         foreach (var card in invalidFlags)
         {
             _logger.WriteLine("{0}", card);
             _logger.Write("     flags:");
             foreach (var flag in card.Flags)
             {
                 _logger.Write(" {0}", flag ? "1" : "0");
             }
             _logger.Write("  expected:");
             foreach (var flag in EcCard.ExpectedFlags(card.ProjectNumber))
             {
                 _logger.Write(" {0}", flag ? "1" : "0");
             }
             _logger.WriteLine();
         }
     }
     finally
     {
         _connection.Close();
     }
 }
        public void TestFlagsValidity()
        {
            _logger.WriteLine("Testing card validity...");
            foreach (var card in _allCards.Where(c => !c.IsFlagsValid))
            {
                _logger.WriteLine("{0}", card);
                _logger.Write("     flags:");
                foreach (var flag in card.Flags)
                {
                    _logger.Write(" {0}", flag ? "1" : "0");
                }
                _logger.Write("  expected:");
                foreach (var flag in EcCard.ExpectedFlags(card.ProjectNumber))
                {
                    _logger.Write(" {0}", flag ? "1" : "0");
                }
                card.ClearSurplusFlags();

                _logger.WriteLine();
            }
        }