Ejemplo n.º 1
0
 public void install()
 {
     var nuGet = new API_NuGet();
     nuGet.install("FluentSharp.CoreLib").assert_Not_Null()         .assert_Folder_Exists()
                                         .pathCombine(@"lib").pathCombine("net35").assert_Folder_Exists()
                                         .files().first().fileName().assert_Is_Equal_To  ("FluentSharp.CoreLib.dll");
 }
Ejemplo n.º 2
0
 public void has_Package()
 {
     var packageName = "FluentSharp.CoreLib";
     var nuGet = new API_NuGet();
     nuGet.install(packageName);
     nuGet.has_Package(packageName).assert_True();
 }
Ejemplo n.º 3
0
 public void path_Package()
 {
     var packageName = "FluentSharp.CoreLib";
     var nuGet = new API_NuGet();
     nuGet.install(packageName);
     nuGet.path_Package(packageName).assert_Not_Null()
                                    .assert_Contains(packageName)
                                    .assert_Folder_Exists();
 }
 public static CSharp_FastCompiler_CompilerOptions mapNuGetReferences(this CSharp_FastCompiler_CompilerOptions compilerOptions, API_NuGet nuGet)
 {
     foreach(var nugetReference  in compilerOptions.NuGet_References)
     {
         if(nuGet.does_Not_Have_Package(nugetReference))
             nuGet.install(nugetReference);
         var assemmbliesInsideNugetPackage = nuGet.path_Package(nugetReference).files(true,"*.exe", "*.dll");
         if (assemmbliesInsideNugetPackage.empty())
             "[CSharp_FastCompiler_CompilerOptions][mapNuGetReferences] no assemblies found for Nuget package: {0}".error(nugetReference);
         compilerOptions.ReferencedAssemblies.add(assemmbliesInsideNugetPackage);
     }
     return compilerOptions;
 }
Ejemplo n.º 5
0
        public void resolveCompilationReferencePath()
        {
            //testing NuGet assembly resolution (other parts of resolveCompilationReferencePath are missing)

            var assemblyName = "FluentSharp.HtmlAgilityPack";
            var nuGet =new API_NuGet();
            nuGet.install(assemblyName);
            nuGet.path_Package(assemblyName).assert_Folder_Exists();

            CompileEngine.resolveCompilationReferencePath(assemblyName).assert_File_Exists()
                                                                       .assert_Contains(assemblyName)
                                                                       .fileName().assert_Is(assemblyName.append(".dll"));
        }