support version spec filter
[teamcity/dotNetPackagesSupport.git] / nuget-extensions / nuget-tests / src / NuGetRunner_ListCommandTest.cs
1 using NUnit.Framework;\r
2 using NuGet;\r
3 \r
4 namespace JetBrains.TeamCity.NuGet.Tests\r
5 {\r
6   [TestFixture]\r
7   public class NuGetRunner_ListCommandTest\r
8   {\r
9     [Test]\r
10     public void TestCommand_TeamListPublic()\r
11     {\r
12       ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath, "TeamCity.List", "-Id", "NUnit", "-Source", NuGetConstants.DefaultFeedUrl)\r
13         .Dump()\r
14         .AssertExitedSuccessfully()\r
15         .AssertNoErrorOutput()\r
16         .AssertOutputContains("##teamcity[nuget-package Id='NUnit' Version='2.5.10.11092']");\r
17     }\r
18 \r
19     [Test]\r
20     public void TestCommand_TeamListPublicVersion()\r
21     {\r
22       var r = ProcessExecutor.ExecuteProcess(NuGetRunner.Path.Value, NuGet.NuGetPath, "TeamCity.List", "-Id", "NUnit", "-Version", "(1.1.1, 2.5.8)", "-Source", NuGetConstants.DefaultFeedUrl)\r
23         .Dump()\r
24         .AssertExitedSuccessfully()\r
25         .AssertNoErrorOutput()\r
26         .AssertOutputContains("##teamcity[nuget-package Id='NUnit' Version='2.5.7.10213']");\r
27 \r
28       Assert.IsFalse(r.Output.Contains("Version='2.5.10"));\r
29     }\r
30   }\r
31 }