Ejemplo n.º 1
0
        public void InsertToDbTest_ShouldInsertEntriesToOuboundStrEmails()
        {
            foreach (List <string> entryX in this.OutboundEmailsList)
            {
                string fileName               = entryX[0];
                string subject                = entryX[1];
                string emailUsername          = entryX[2];
                string sentDate               = entryX[3];
                OutboundStrEmailsHandler outH = new OutboundStrEmailsHandler(this.DbPath, fileName, subject, emailUsername, sentDate);
                outH.InsertToDb();
            }
            MyDbUtils muForRead     = new MyDbUtils(this.DbPath);
            long      actualCount   = muForRead.CountEntries("OutboundStrEmails");
            long      expectedCount = 3;

            Assert.Equal(expectedCount, actualCount);
        }
Ejemplo n.º 2
0
        public void LoadPhaseXFromDb_ShouldLoadEntriesViaGivenPhase()
        {
            foreach (List <string> entryX in this.OutboundEmailsList)
            {
                string fileName               = entryX[0];
                string subject                = entryX[1];
                string emailUsername          = entryX[2];
                string sentDate               = entryX[3];
                OutboundStrEmailsHandler outH = new OutboundStrEmailsHandler(this.DbPath, fileName, subject, emailUsername, sentDate);
                outH.InsertToDb();
            }
            OutboundStrEmailsHandler outH2 = new OutboundStrEmailsHandler(this.DbPath);
            DataTable dtX           = outH2.LoadPhaseXFromDb("PHASE1");
            long      expectedCount = 2;
            long      actualCount   = (long)dtX.Rows.Count;

            Assert.Equal(expectedCount, actualCount);
        }