Esempio n. 1
0
 public void SetupTestDB()
 {
     WorkWithDB.CreateTestDB(ConnectionStringToPostgres, testDBName + (testDataBaseCounter));
     WorkWithDB.DataBaseСustomization(GetConnectionStringToTestDB(testDataBaseCounter));
     testDataBaseCounter++;
     Assert.IsTrue(true);
 }
Esempio n. 2
0
 public void zDropAllTestDataBases()
 {
     for (int iter = 0; iter <= 30; iter++)
     {
         try
         {
             WorkWithDB.DropTestDB(ConnectionStringToPostgres, testDBName + iter);
         }
         catch { }
     }
 }
Esempio n. 3
0
        public void add_chat_NumberTest()
        {
            DBWorker dBWorker          = DBWorkerInit();
            int      MaxAddChatsIters  = rnd.Next(3, 100);
            int      MaxAddChatsNumber = rnd.Next(10, 100);

            for (int iter = 0; iter < MaxAddChatsIters; iter++)
            {
                for (int iter1 = 0; iter1 < MaxAddChatsNumber; iter1++)
                {
                    dBWorker.add_chat(DateTime.UtcNow, iter1, "tttt", 1);
                }
            }
            List <string> chats = WorkWithDB.ExecuteReaderScript(dBWorker.ConnectionString, "select * from public.chats");

            Assert.AreEqual(chats.Count, MaxAddChatsNumber);
        }