/// <summary> /// Sends the BeforeTestRunStart event and waits for result /// </summary> /// <returns>BeforeTestRunStartResult containing environment variables</returns> public BeforeTestRunStartResult SendBeforeTestRunStartAndGetResult(string settingsXml) { this.communicationManager.SendMessage(MessageType.BeforeTestRunStart, settingsXml); var message = this.communicationManager.ReceiveMessage(); if (message.MessageType == MessageType.BeforeTestRunStartResult) { return(dataSerializer.DeserializePayload <BeforeTestRunStartResult>(message)); } return(null); }
void OnTestCasesFound(Message message) { var tests = dataSerializer.DeserializePayload <IEnumerable <TestCase> > (message); discoveredTests.Add(tests); }