Esempio n. 1
0
 private static IVersioningAdapter WithPath(string x, IVersioningAdapter gitAdapter)
 {
     if (!string.IsNullOrEmpty(x))
     {
         gitAdapter.DataSource.SetContext(DataSourceContextKeys.ExePath, x);
     }
     return(gitAdapter);
 }
Esempio n. 2
0
        public static void AssertAdapterFixture(IVersioningAdapter gitAdapter, string fixturesGitLog, string fixturesGitLogResult)
        {
            var text = File.ReadAllText(fixturesGitLog);

            var mkrunner = new Mock<IAdapterDataSource>();
            mkrunner.Setup(x => x.GetDataWithQuery(It.IsAny<string>())).Returns(text);
            gitAdapter.DataSource = mkrunner.Object;
            var analysisResult = new Analyzer(gitAdapter).Analyze();
            var s = new StringWriter();
           
            var tableReporter = new TableReporter(s);
            tableReporter.Write(analysisResult, new MinimalCutoffProcessor(0), int.MaxValue);
            
            s.ToString().ShouldBe(File.ReadAllText(fixturesGitLogResult));
        }
Esempio n. 3
0
        public static void AssertAdapterFixture(IVersioningAdapter gitAdapter, string fixturesGitLog, string fixturesGitLogResult)
        {
            var text = File.ReadAllText(fixturesGitLog);

            var mkrunner = new Mock <IAdapterDataSource>();

            mkrunner.Setup(x => x.GetDataWithQuery(It.IsAny <string>())).Returns(text);
            gitAdapter.DataSource = mkrunner.Object;
            var analysisResult = new Analyzer(gitAdapter).Analyze();
            var s = new StringWriter();

            var tableReporter = new TableReporter(s);

            tableReporter.Write(analysisResult, new MinimalCutoffProcessor(0), int.MaxValue);

            s.ToString().ShouldBe(File.ReadAllText(fixturesGitLogResult));
        }
Esempio n. 4
0
 public AutoDiscoveryAdapter()
 {
     if (Directory.Exists(".git"))
     {
         _adapter = new GitAdapter();
     }
     else if (Directory.Exists(".hg"))
     {
         _adapter = new HgAdapter();
     }
     else if (Directory.Exists(".svn"))
     {
         _adapter = new SvnAdapter();
     }
     else
     {
         _adapter = new TFAdapter();
     }
 }
Esempio n. 5
0
 public AutoDiscoveryAdapter()
 {
     if(Directory.Exists(".git"))
     {
         _adapter = new GitAdapter();
     }
     else if (Directory.Exists(".hg"))
     {
         _adapter = new HgAdapter();
     }
     else if(Directory.Exists(".svn"))
     {
         _adapter = new SvnAdapter();
     }
     else
     {
         _adapter = new TFAdapter();
     }
 }
Esempio n. 6
0
 private static IVersioningAdapter WithPath(string x, IVersioningAdapter gitAdapter)
 {
     if(!string.IsNullOrEmpty(x))
     {
         gitAdapter.DataSource.SetContext(DataSourceContextKeys.ExePath, x);
     }
     return gitAdapter;
 }
Esempio n. 7
0
 public static Analyzer Create(IVersioningAdapter adapter)
 {
     return new Analyzer(adapter);
 }
Esempio n. 8
0
 internal Analyzer(IVersioningAdapter adapter)
 {
     _adapter = adapter;
 }
Esempio n. 9
0
 internal Analyzer(IVersioningAdapter adapter)
 {
     _adapter = adapter;
 }
Esempio n. 10
0
 public static Analyzer Create(IVersioningAdapter adapter)
 {
     return new Analyzer(adapter);
 }