public override void Process(step context)
 {
     context.name = Name;
     context.status = status.passed;
     context.start = _started.HasValue ? _started.Value.ToUnixEpochTime() : AllureResultsUtils.TimeStamp;
     context.title = Title;
 }
        public void StepStorageTest()
        {
            var storage = new StepStorage();
            var step1 = new step();
            var step2 = new step();
            var step3 = new step();

            storage.Put(step1);
            Assert.AreEqual(2, storage.Get().Count);
            Assert.AreEqual(step1, storage.Last);

            new Thread(() =>
            {
                storage.Put(step2);
                Thread.Sleep(100);
                Assert.AreEqual(2, storage.Get().Count);
                Assert.AreEqual(step2, storage.Last);
            }).Start();

            new Thread(() =>
            {
                storage.Put(step3);
                Assert.AreEqual(2, storage.Get().Count);
                Assert.AreEqual(step3, storage.Last);
            }).Start();
        }
        public override void Process(step context)
        {
            status status = (Throwable != null
				&& Throwable.GetType().ToString().Contains("Assert"))
                ? status.failed
                : status.broken;
            context.status = status;
        }
 public abstract void Process(step context);
 public override void Process(step context)
 {
 }
 public override void Process(step context)
 {
     context.status = status.canceled;
 }
 public override void Process(step context)
 {
     context.stop = _finished.HasValue ? _finished.Value.ToUnixEpochTime() : AllureResultsUtils.TimeStamp;
 }
 public override void Process(step context)
 {
     context.attachments = ArraysUtils.Add(context.attachments, Attach);
 }
 /// <summary>
 /// Processes all step events.
 /// <see cref="AllureCSharpCommons.Events.StepStartedEvent"/>
 /// <see cref="AllureCSharpCommons.Events.StepCanceledEvent"/>
 /// <see cref="AllureCSharpCommons.Events.StepFinishedEvent"/>
 /// </summary>
 /// <param name="evt">event to process</param>
 public void Fire(IStepEvent evt)
 {
     if (typeof (StepStartedEvent).IsAssignableFrom(evt.GetType()))
     {
         var step = new step();
         evt.Process(step);
         StepStorage.Put(step);
     }
     else if (typeof (StepFinishedEvent).IsAssignableFrom(evt.GetType()))
     {
         var step = StepStorage.PollLast();
         evt.Process(step);
         StepStorage.Last.steps = ArraysUtils.Add(StepStorage.Last.steps, step);
     }
     else
     {
         var step = StepStorage.Last;
         evt.Process(step);
     }
 }
 internal void Put(step step)
 {
     Get().AddLast(step);
 }