public void GetAllEnumerable() { var mockPersons = table.GetTable(); using (MySqlConnection conn = new MySqlConnection(MySqlUtility.ConnectionString)) { conn.Open(); var people = conn.GetEnumerable<Person>("select * from person"); Assert.AreEqual(mockPersons.Count, people.Count()); int i = 0; foreach (IPerson person in people) { Assert.AreEqual(mockPersons[i].Id, person.Id); Assert.AreEqual(mockPersons[i].Name, person.Name); Assert.AreEqual(mockPersons[i].DateOfBirth, person.DateOfBirth); Assert.AreEqual(mockPersons[i].SSN, person.SSN); Assert.AreEqual(mockPersons[i].BankAccount, person.BankAccount); Assert.AreEqual(mockPersons[i].NoofCars, person.NoofCars); Assert.AreEqual(mockPersons[i].IsPremium, person.IsPremium); i++; } } }