Exemplo n.º 1
0
        public void FetchNewMsgTest()
        {
            SimCorpMobile simCorp = new SimCorpMobile(new FakeOutput());

            simCorp.MsgStor.MsgAdded += OnMsgChanged;
            int expLength = 1;

            simCorp.GenerateSMS();

            Assert.IsTrue(expLength == simCorp.MsgStor.MsgList.Count);
        }
Exemplo n.º 2
0
 private void SMSButton_Click(object sender, EventArgs e)
 {
     SMSButtonClicked = !SMSButtonClicked;
     if (SMSButtonClicked)
     {
         SMSButton.Text = "Stop send SMS";
         SMSGenTask     = new Task(() => {
             while (SMSButtonClicked)
             {
                 simCorp.GenerateSMS();
                 SMSGenTask.Wait(1000);
             }
         });
         SMSGenTask.Start();
     }
     else
     {
         SMSButton.Text = "Send SMS";
     }
 }