Exemple #1
0
        public void ShouldGetCompilationDependenciesForIssue129()
        {
            var resolver     = CreateResolver();
            var dependencies = resolver.GetDependencies(TestPathUtils.GetFullPathToTestFixture("Issue129"), true, _scriptEnvironment.TargetFramework);

            Assert.Contains(dependencies, d => d.Name == "Auth0.ManagementApi");
        }
Exemple #2
0
        public void ShouldGetCompilationDependenciesForPackageContainingNativeLibrary()
        {
            var resolver     = CreateResolver();
            var dependencies = resolver.GetDependencies(TestPathUtils.GetFullPathToTestFixture("NativeLibrary"), true, _scriptEnvironment.TargetFramework);

            Assert.Contains(dependencies, d => d.Name == "Microsoft.Data.Sqlite");
        }
Exemple #3
0
        public void ShouldGetCompilationDependenciesForPackageContainingInlineNuGetPackageReference()
        {
            var resolver     = CreateResolver();
            var dependencies = resolver.GetDependencies(TestPathUtils.GetFullPathToTestFixture("InlineNugetPackage"), true, _scriptEnvironment.TargetFramework);

            Assert.Contains(dependencies, d => d.Name == "AutoMapper");
        }
        public void ShouldCopyLocalNuGetConfig()
        {
            var provider                = CreateProvider();
            var pathToProjectFile       = provider.CreateProject(TestPathUtils.GetFullPathToTestFixture("LocalNuGetConfig"), RuntimeHelper.TargetFramework, true);
            var pathToProjectFileFolder = Path.GetDirectoryName(pathToProjectFile);

            Assert.True(File.Exists(Path.Combine(pathToProjectFileFolder, "NuGet.Config")));
        }
        public void ShouldLogProjectFileContent()
        {
            StringBuilder log      = new StringBuilder();
            var           provider = new ScriptProjectProvider(type => ((level, message) => log.AppendLine(message)));

            provider.CreateProject(TestPathUtils.GetFullPathToTestFixture("HelloWorld"), RuntimeHelper.TargetFramework, true);
            var output = log.ToString();

            Assert.Contains("<Project Sdk=\"Microsoft.NET.Sdk\">", output);
        }
        private static string GetPathToPackagesFolder()
        {
            var targetDirectory = TestPathUtils.GetFullPathToTestFixture(Path.Combine("ScriptPackage", "packages"));

            return(DependencyModel.ProjectSystem.FileUtils.CreateTempFolder(targetDirectory));
        }
Exemple #7
0
        private static string GetPathToPackagesFolder()
        {
            var targetDirectory = TestPathUtils.GetFullPathToTestFixture(Path.Combine("ScriptPackage", "packages"));

            return(RuntimeHelper.CreateTempFolder(targetDirectory));
        }