<commit_before>﻿using System.Linq;
using NUnit.Framework;
using NuGet.Extensions.Tests.TestObjects;

namespace NuGet.Extensions.Tests.Commands
{
    public class RepositoryConfigExecuteTests : GetCommandTestsBase
    {
        protected override void SetUpTest()
        {
        }

        [TestCase(@"c:\TestSolution", 2)]
        public void InstallSampleRepository(string repository, int expectedCount)
        {
            GetCommand.Arguments.Add(repository);
            GetCommand.Latest = true;
            GetCommand.ExecuteCommand();
            var packageCount = FileSystem.Object.GetDirectories(@"c:\TestSolution\packages").Count();
            Assert.AreEqual(expectedCount, packageCount);
        }

        [TestCase(@"c:\TestSolution\Project1\packages.config", 2)]
        [TestCase(@"c:\TestSolution\Project2\packages.config", 2)]
        public void ExpectedInstallCounts(string packageConfig, int expectedCount)
        {
            GetCommand.Arguments.Add(packageConfig);
            GetCommand.ExecuteCommand();
            var packageCount =  FileSystem.Object.GetDirectories(@"c:\TestSolution\packages").Count();
            Assert.AreEqual(expectedCount, packageCount);
        }

        [TestCase(@"c:\TestSolution\Project1\packages.config", 2)]
        public void ExcludeVersion(string packageConfig, int expectedCount)
        {
            GetCommand.Arguments.Add(packageConfig);
            GetCommand.ExcludeVersion = true;
            GetCommand.ExecuteCommand();
            var packageCount =  FileSystem.Object.GetDirectories(@"c:\TestSolution\packages").Count();
            Assert.AreEqual(expectedCount, packageCount);
        }

    }
}<commit_msg>Failing tests for relative paths.<commit_after>﻿using System.Linq;
using NUnit.Framework;
using NuGet.Extensions.Tests.TestObjects;

namespace NuGet.Extensions.Tests.Commands
{
    public class RepositoryConfigExecuteTests : GetCommandTestsBase
    {
        protected override void SetUpTest()
        {
        }

        [TestCase(@"c:\TestSolution", 2)]
        public void InstallSampleRepository(string repository, int expectedCount)
        {
            GetCommand.Arguments.Add(repository);
            GetCommand.Latest = true;
            GetCommand.ExecuteCommand();
            var packageCount = FileSystem.Object.GetDirectories(@"c:\TestSolution\packages").Count();
            Assert.AreEqual(expectedCount, packageCount);
        }

        [TestCase(@"c:\TestSolution\Project1\packages.config", 2)]
        [TestCase(@"c:\TestSolution\Project2\packages.config", 2)]
        public void ExpectedInstallCounts(string packageConfig, int expectedCount)
        {
            GetCommand.Arguments.Add(packageConfig);
            GetCommand.ExecuteCommand();
            var packageCount =  FileSystem.Object.GetDirectories(@"c:\TestSolution\packages").Count();
            Assert.AreEqual(expectedCount, packageCount);
        }

        [TestCase(@"c:\TestSolution\Project1\packages.config", 2)]
        public void ExcludeVersion(string packageConfig, int expectedCount)
        {
            GetCommand.Arguments.Add(packageConfig);
            GetCommand.ExcludeVersion = true;
            GetCommand.ExecuteCommand();
            var packageCount =  FileSystem.Object.GetDirectories(@"c:\TestSolution\packages").Count();
            Assert.AreEqual(expectedCount, packageCount);
        }

        [TestCase(@".\TestSolution\Project1\packages.config", 2)]
        [TestCase(@".\TestSolution", 2)]
        public void CanUseRelativePaths(string packageConfig, int expectedCount)
        {
            GetCommand.Arguments.Add(packageConfig);
            GetCommand.ExcludeVersion = true;
            GetCommand.ExecuteCommand();
            var packageCount = FileSystem.Object.GetDirectories(@"c:\TestSolution\packages").Count();
            Assert.AreEqual(expectedCount, packageCount);
        }
    }
}
{'fraction_non_alphanumeric': 0.10796324655436447, 'fraction_numerical': 0.004338948443083206, 'mean_word_length': 2.753831417624521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '358738', 'n_tokens_mistral': 1002, 'n_tokens_neox': 954, 'n_words': 157}