/// <summary> /// Dump all tuples out of channel cache /// </summary> /// <returns></returns> public static List <TestOutput> GetOutput(this Component c) { List <TestOutput> res = new List <TestOutput>(); TestChannel comp_channel = (TestChannel)c.Channel; while (comp_channel.IsEmpty() == false) { OutMessage message = comp_channel.OutputMessage(); if (message is SpoutTuple) { res.Add(new SpoutOutput((SpoutTuple)message, c.Context.ComponentId)); } else if (message is BoltTuple) { res.Add(new BoltOutput((BoltTuple)message, c.Context.ComponentId)); } } return(res); }