Exemplo n.º 1
0
 public SourcesProvider(string projectFilePath, IFileSystem fileSystem, IConsole console)
 {
     _fileSystem = fileSystem;
     _console = console;
     _directory = Path.GetDirectoryName(projectFilePath);
     var sourceFileFinder = new SourceFileFinder(projectFilePath, fileSystem);
     _sourceFile = sourceFileFinder.FindSourcesFile();
 }
Exemplo n.º 2
0
 public void Net45Test()
 {
     _fileSystem.Setup(x => x.GetFiles("x/y/z".ToPlatformPath(), "*.sources", SearchOption.TopDirectoryOnly))
         .Returns(new[]
         {
             "net_4_5_Lx.Tools.Common.dll.sources",
             "net_4_5_Lx.Tools.Common.Test.dll.sources",
             "net_4_5_Lx.Tools.dll.sources",
             "basic_Lx.Tools.Common.dll.sources"
         });
     var sourceFileFinder = new SourceFileFinder(@"x/y/z/net_4_5-Lx.Tools.Common.csproj", _fileSystem.Object);
     var sourceFound = sourceFileFinder.FindSourcesFile();
     Assert.AreEqual("net_4_5_Lx.Tools.Common.dll.sources", sourceFound);
 }
Exemplo n.º 3
0
 public void NoUniqueSourceTest()
 {
     _fileSystem.Setup(x => x.GetFiles("x/y/z".ToPlatformPath(), "*.sources", SearchOption.TopDirectoryOnly))
         .Returns(new[]
         {
             "net_4_5_Lx.Tools.Common.dll.sources",
             "net_4_5_Lx.Tools.Common.Test.dll.sources",
             "net_4_5_Lx.Tools.dll.sources",
             "net_4_5_build_Lx.Tools.Common.dll.sources"
         });
     var sourceFileFinder = new SourceFileFinder(@"x/y/z/net_4_5-Lx.Tools.Common.csproj", _fileSystem.Object);
     sourceFileFinder.FindSourcesFile();
 }