Пример #1
0
        public object FillAllCustomers()
        {
            _lastQuery = QueryCriteria.GetAll;
            _paramsObjects.Clear();
            var _repo = new CustomRepository <string>();

            return(_repo.FillAll());
        }
        public void Validation_Test()
        {
            CustomRepository <string> repo = new CustomRepository <string>();
            DataSet ds = (DataSet)repo.FillAll();

            repo.Validation();
            Assert.IsTrue(ds.Tables["Error"].Rows.Count > 0);
        }
        public void ValidatedTest()
        {
            Init();
            CustomRepository <string> repo = new CustomRepository <string>();
            DataSet ds = (DataSet)repo.FillAll();

            DataRowView row = ds.Tables["Register"].DefaultView.AddNew();

            row[0]            = ds.Tables["Register"].Rows[0][0];
            row["CustomerID"] = ds.Tables["Register"].Rows[0]["CustomerID"];

            row["FirstRegister"]    = new Nullable <DateTime>(new DateTime(2015, 1, 10));
            row["FirstDeRegister"]  = new Nullable <DateTime>(new DateTime(2011, 1, 1));
            row["SecondRegister"]   = new Nullable <DateTime>(new DateTime(2009, 1, 1));
            row["SecondDeRegister"] = new Nullable <DateTime>(new DateTime(1999, 1, 1));
            repo.Validated(row);
            foreach (DataRow r in  ds.Tables["Error"].Rows)
            {
                Debug.WriteLine(r[1] + " " + r[2].ToString());
            }
            Assert.IsTrue(ds.Tables["Error"].Rows.Count > 0);
        }
Пример #4
0
        public object GetEmptyData()
        {
            CustomRepository <string> _repo = new CustomRepository <string>();

            return(_repo.FillAll());
        }