/// <summary>
        /// Processes all testsuite events.
        /// When processes TestSuiteFinishedEvent serializes it to xml file.
        /// <see cref="AllureCSharpCommons.Events.TestSuiteStartedEvent"/>
        /// <see cref="AllureCSharpCommons.Events.TestSuiteFinishedEvent"/>
        /// </summary>
        /// <param name="evt">event to process</param>
        public void Fire(ITestSuiteEvent evt)
        {
            if (typeof(TestSuiteFinishedEvent).IsAssignableFrom(evt.GetType()))
            {
                var suiteUid        = evt.Uid;
                var testsuiteresult = TestSuiteStorage.Get(suiteUid);

                if (AllureConfig.AllowEmptySuites ||
                    (testsuiteresult.testcases != null && testsuiteresult.testcases.Length > 0))
                {
                    evt.Process(testsuiteresult);
                    testsuiteresult.SaveToFile(AllureResultsUtils.TestSuitePath);
                }

                TestSuiteStorage.Remove(suiteUid);
            }
            else
            {
                TestSuiteStorage.Put(evt.Uid);
                var testsuiteresult = TestSuiteStorage.Get(evt.Uid);
                evt.Process(testsuiteresult);
            }
        }
        /// <summary>
        /// Processes all testsuite events.
        /// When processes TestSuiteFinishedEvent serializes it to xml file.
        /// <see cref="AllureCSharpCommons.Events.TestSuiteStartedEvent"/>
        /// <see cref="AllureCSharpCommons.Events.TestSuiteFinishedEvent"/>
        /// </summary>
        /// <param name="evt">event to process</param>
        public void Fire(ITestSuiteEvent evt)
        {
            if (typeof (TestSuiteFinishedEvent).IsAssignableFrom(evt.GetType()))
            {
                var suiteUid = evt.Uid;
                var testsuiteresult = TestSuiteStorage.Get(suiteUid);
                
                if (AllureConfig.AllowEmptySuites
                    || (testsuiteresult.testcases != null && testsuiteresult.testcases.Length > 0))
                {
                    evt.Process(testsuiteresult);
                    testsuiteresult.SaveToFile(AllureResultsUtils.TestSuitePath);
                }

                TestSuiteStorage.Remove(suiteUid);
            }
            else
            {
                TestSuiteStorage.Put(evt.Uid);
                var testsuiteresult = TestSuiteStorage.Get(evt.Uid);
                evt.Process(testsuiteresult);
            }
        }