public void VerifyHourlyRate() { Random random = new Random(); IHourlyRate hourlyRate = BusinessObjectInitializer.CreateHourlyRate(); hourlyRate.YearMonth = random.Next(2010, 2079) * 100 + random.Next(1, 12); hourlyRate.IdCurrency = random.Next(1, 12); hourlyRate.IdCostCenter = random.Next(1, 3); hourlyRate.Value = DATestUtils.DEFAULT_DECIMAL_VALUE; int newId = InsertHourlyRateTest(hourlyRate); Assert.AreEqual(newId, 0); int rowsAffected = UpdateHourlyRateTest(hourlyRate); Assert.AreEqual(1, rowsAffected); DataTable resultTable = SelectHourlyRateTest(hourlyRate).Tables[0]; //Verifies that the table contains the correct column names and order StringCollection columns = new StringCollection(); columns.AddRange(new string[] { "InergyLocationName", "CostCenterCode", "CurrencyName", "Value", "YearMonth", "CostCenterName", "IdInergyLocation", "IdCostCenter", "IdCurrency" }); DATestUtils.CheckTableStructure(resultTable, columns); int rowCount = DeleteHourlyRateTest(hourlyRate); Assert.AreEqual(1, rowCount); }