public void CanGetAllRigs() { List <Rig> rigs = repo.GetAll().ToList(); Rig rig = rigs.First(); Assert.IsTrue(rigs.Count == 1); DataRow row = dataSet.Tables[0].Rows[0]; // Check to make sure all the data in the hydrated Rig class matches the datarow values. Assert.AreEqual(rig.ID, row.AsGuid("RigID")); Assert.AreEqual(rig.Name, row.AsString("RigName")); Assert.AreEqual(rig.RigType.ID, row.AsGuid("RigTypeID")); Assert.AreEqual(rig.RigType.Name, row.AsString("RigTypeName")); Assert.AreEqual(rig.WaterDepth, row.AsInt("WaterDepth")); Assert.AreEqual(rig.DrillingDepth, row.AsInt("DrillingDepth")); Assert.AreEqual(rig.Manager.ID, row.AsGuid("ManagerID")); Assert.AreEqual(rig.Manager.Name, row.AsString("ManagerName")); Assert.AreEqual(rig.CurrentLocation.Region.ID, row.AsGuid("RegionID")); Assert.AreEqual(rig.CurrentLocation.Region.Name, row.AsString("RegionName")); Assert.AreEqual(rig.CurrentLocation.Country.ID, row.AsGuid("CountryID")); Assert.AreEqual(rig.CurrentLocation.Country.Name, row.AsString("CountryName")); Assert.AreEqual(rig.CurrentLocation.BlockOrWell, row.AsString("CurrentBlockOrWell")); Assert.AreEqual(rig.CurrentLocation.StartDate, row.AsDate("CurrentStartDate")); Assert.AreEqual(rig.CurrentLocation.EndDate, row.AsNullableDate("CurrentEndDate")); }
public IEnumerable <Rig> GetAllRigs() => m_rigRepo.GetAll();