Пример #1
0
 public void SetUp()
 {
     scmDataStub = MockRepository.GenerateStub<IScmData>();
     calls = new List<string>();
     scmDataStub.Stub(x => x.Log(null))
         .IgnoreArguments()
         .Do((Func<string,ILog>)(r =>
         {
             calls.Add("log" + r);
             return null;
         }));
     scmDataStub.Stub(x => x.Diff(null,null))
         .IgnoreArguments()
         .Do((Func<string,string,IDiff>)((r,f) =>
         {
             calls.Add("diff" + r + f);
             return null;
         }));
     scmDataStub.Stub(x => x.Blame(null, null))
         .IgnoreArguments()
         .Do((Func<string,string,IBlame>)((r, f) =>
         {
             calls.Add("blame" + r + f);
             return null;
         }));
     cache = new ScmDataCache(scmDataStub);
 }
Пример #2
0
 public void SetUp()
 {
     scmDataStub = MockRepository.GenerateStub <IScmData>();
     calls       = new List <string>();
     scmDataStub.Stub(x => x.Log(null))
     .IgnoreArguments()
     .Do((Func <string, ILog>)(r =>
     {
         calls.Add("log" + r);
         return(null);
     }));
     scmDataStub.Stub(x => x.Diff(null, null))
     .IgnoreArguments()
     .Do((Func <string, string, IDiff>)((r, f) =>
     {
         calls.Add("diff" + r + f);
         return(null);
     }));
     scmDataStub.Stub(x => x.Blame(null, null))
     .IgnoreArguments()
     .Do((Func <string, string, IBlame>)((r, f) =>
     {
         calls.Add("blame" + r + f);
         return(null);
     }));
     cache = new ScmDataCache(scmDataStub);
 }