示例#1
0
        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";
        }
示例#2
0
 public void TestDBRetrieve()
 {
     c2 = (CustomerProps)db.Retrieve(1);
     Assert.AreEqual(c2.city, "Birmingham");
 }
示例#3
0
        public void TestClone()
        {
            CustomerProps newC = (CustomerProps)c.Clone();

            Assert.AreEqual(newC.GetState(), c.GetState());
        }
示例#4
0
 public void TestDBDelete()
 {
     c = (CustomerProps)db.Retrieve(2);
     Assert.True(db.Delete(c));
 }
示例#5
0
 public void TestDBUpdate()
 {
     c         = (CustomerProps)db.Retrieve(1);
     c.address = "I like thanksgiving.";
     Assert.True(db.Update(c));
 }