public TestsExecutionFinishedEventArgs(ComposedUnitTestOutcome results)
 {
     Results = results;
 }
        public void TestsFinished(string result)
        {
            var convertedResults = new ComposedUnitTestOutcome();
            try
            {
                convertedResults = _serializationService.Deserialize<ComposedUnitTestOutcome>(result);
            }
            catch (Exception exc)
            {
                OnErrorOccured("Error while deserializing Test Run Results: " + exc.Message);
            }

            OnFinished(convertedResults);
        }
 private void OnFinished(ComposedUnitTestOutcome results)
 {
     var handler = TestsExecutionFinished;
     if (handler != null)
     {
         handler(this, new TestsExecutionFinishedEventArgs(results));
     }
 }
        public void PublishResultsWithError(Exception error)
        {
            var errorInfo = _silverlightUnitTestAbstractionsFactory.Convert(error);
            var results = new ComposedUnitTestOutcome() {Errors = new List<IUnitTestException>() {errorInfo}};

            var serializedResult = _serializationService.Serialize(results);

            InvokeExternalMethod("TestsFinished", serializedResult);
        }