public void Setup() { db = new CustomerDB(dataSource); c = new CustomerProps(); DBCommand command = new DBCommand(); command.CommandText = "usp_testingResetData"; command.CommandType = CommandType.StoredProcedure; db.RunNonQueryProcedure(command); c.customerID = 100; c.name = "Mickey Mouse"; c.address = "101 Disney Land Lane"; c.city = "California"; c.state = "CA"; c.zipCode = "99999"; }
public void TestDBRetrieve() { c2 = (CustomerProps)db.Retrieve(1); Assert.AreEqual(c2.city, "Birmingham"); }
public void TestClone() { CustomerProps newC = (CustomerProps)c.Clone(); Assert.AreEqual(newC.GetState(), c.GetState()); }
public void TestDBDelete() { c = (CustomerProps)db.Retrieve(2); Assert.True(db.Delete(c)); }
public void TestDBUpdate() { c = (CustomerProps)db.Retrieve(1); c.address = "I like thanksgiving."; Assert.True(db.Update(c)); }