Пример #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));
 }