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); }
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"; } }