示例#1
0
 public void Init()
 {
     timer  = Substitute.For <IHeartBeatTimer>();
     invoke = Substitute.For <ISynchronizationContext>();
     invoke.When(x => x.Post(Arg.Any <Action>())).Do(callInfo =>
     {
         Assert.IsNull(lastInvokedAction);
         lastInvokedAction = callInfo.Arg <Action>();
     });
     agg       = ((IProgressAggregatorFactory) new ProgressAggregator.Factory(timer, invoke)).CreateProgressAggregator();
     outEvents = MakeOutEventsMock(agg);
 }