private static void Add( long time, string desc) { var timeAction = Actions.Get(time); if (timeAction == null) { timeAction = new TimeAction(); timeAction.ActionDesc = desc; Actions.Put(time, timeAction); } }
private void ProcessAction( long currentTime, string timeInSec, TimeAction value, bool isAssert, bool isExpectNullRemoveStream, bool assertAllowAnyOrder) { var assertions = expected.GetAssertions().Get(currentTime); // Assert step 0 which is the timer event result then send events and assert remaining AssertStep( timeInSec, 0, assertions, expected.Properties, isAssert, isExpectNullRemoveStream, assertAllowAnyOrder); for (var step = 1; step < 10; step++) { if (value.Events.Count >= step) { var sendEvent = value.Events[step - 1]; log.Info( ".execute At " + timeInSec + " sending event: " + sendEvent.TheEvent + " " + sendEvent.EventDesc); env.SendEventBean(sendEvent.TheEvent); if (PREFORMATLOG.IsDebugEnabled) { PREFORMATLOG.Debug( string.Format( "{0:5} {1,5}{2,8} {3,7:F1} {4}", "", sendEvent.TheEvent.Symbol, sendEvent.TheEvent.Volume, sendEvent.TheEvent.Price, sendEvent.EventDesc)); } } AssertStep( timeInSec, step, assertions, expected.Properties, isAssert, isExpectNullRemoveStream, assertAllowAnyOrder); } }
private static void Add( long time, SupportMarketDataBean theEvent, string eventDesc) { var timeAction = Actions.Get(time); if (timeAction == null) { timeAction = new TimeAction(); Actions.Put(time, timeAction); } timeAction.Add(theEvent, eventDesc); }