Esempio n. 1
0
        public void InferDBTableTest()
        {
            MockObject mo       = new MockObject();
            string     expected = "MOCK_SIMPLE";
            string     actual   = ReflectionUtils.InferDBTable(mo);

            Assert.AreEqual(expected, actual);
            Employee temp = new Employee();

            expected = "EMPLOYEE";
            actual   = ReflectionUtils.InferDBTable(temp);
            Assert.AreEqual(expected, actual);
        }
        public void TestAttributeSimpleSelect()
        {
            Employee criteria = new Employee();

            criteria.Id = 5;
            OleDbConnection con = new OleDbConnection(connectString);

            con.Open();
            SimpleDAO <MockObject> dao      = new SimpleDAO <MockObject>();
            MockObject             returned = dao.SimpleSelect(con, criteria);

            Assert.AreEqual(returned.Id, criteria.Id);
        }