예제 #1
0
파일: DBTests.cs 프로젝트: kustlyvy/CS_apps
        public void TestGetTransactions()
        {
            string server   = "176.9.113.46";
            string database = "CollectionSystem-Imports";
            string login    = "******";
            string password = "******";

            DatabaseReader.OpenConnection(new Parameters(
                                              server,
                                              database,
                                              login,
                                              password
                                              ));

            SqlDataReader reader   = null;
            List <string> testList = new List <string>();

            testList.Add("399527");
            testList.Add("399528");
            testList.Add("399529");
            testList.Add("399530");
            testList.Add("399531");
            DatabaseReader.GetTransactions(ref reader, ref testList);

            List <sync2Live.SyncEntities.SyncTransaction> listTr = new List <sync2Live.SyncEntities.SyncTransaction>();

            string tr_req = Request.CreateTransactionRequest(ref reader, ref listTr);

            reader.Close();

            DatabaseReader.CloseConnection();

            Assert.IsTrue(listTr.Count == 9);
        }