public override void Initialize() { var testRunner = this.CreateTestRunner(this.TestContext.TestName); var workbook = testRunner.Workbook; TestExchangeSyncHelper.SetExchangeSettings(this.TestContext, null, null); this.settings = new EwsRequestSettings( TestExchangeSyncHelper.Email, TestExchangeSyncHelper.UserName, TestExchangeSyncHelper.Password, TestExchangeSyncHelper.Server); this.server = new EwsSyncServer(this.settings); this.syncService = new EwsSyncService(workbook); this.server.GetRootFolderIdentifiersAsync().ContinueWith(r => this.folderIdentifiers = r.Result).Wait(); TestLogHandler.Initialize($"ews-trace-{this.TestContext.TestName}"); this.DeleteAllTasksAsync().Wait(); this.DeleteAllInboxEmailsAsync().Wait(); this.DeleteAllDeletedItemsAsync().Wait(); }
public HttpResponseMessage Post(Contact contact, HttpRequestMessage requestMessage) { _contactRepository.SaveContact(contact); var response = requestMessage.CreateResponse<Contact>(System.Net.HttpStatusCode.Created, contact); //Queuestore q = new Queuestore(); //string queuename = "hahaha"; // Create or reference an existing queue // CloudQueue queue = q.CreateQueueAsync(queuename).Result; int num = Convert.ToInt32(contact.Number); ITestLogHandler ilogHandler = new TestLogHandler(); ilogHandler.SendQueueAsyncAll(num); //q.SendQueueAsyncAll(num, responselog); return response; }
public void SetUp() { handler = new TestLogHandler(); Log.SetHandler(handler); }