From f6ac7062212343ad078566233c7c5d51226f47ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pereira?= Date: Fri, 22 Oct 2021 11:39:21 +0100 Subject: [PATCH] test: remove dependencies packing #54 --- tests/Specs/Pack.cs | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/tests/Specs/Pack.cs b/tests/Specs/Pack.cs index 026390b0..5f03a6cf 100644 --- a/tests/Specs/Pack.cs +++ b/tests/Specs/Pack.cs @@ -1,16 +1,10 @@ using Cmf.Common.Cli.Commands; using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Collections.Generic; using System.CommandLine; using System.CommandLine.Invocation; using System.CommandLine.IO; using System.IO; using System.IO.Abstractions; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; namespace tests.Specs { @@ -22,9 +16,7 @@ public void Args_Paths_BothSpecified() { string _workingDir = null; string _outputDir = null; - string _repo = null; bool? _force = null; - bool? _skipDependencies = null; var packCommand = new PackCommand(); var cmd = new Command("pack"); @@ -35,12 +27,9 @@ public void Args_Paths_BothSpecified() { _workingDir = workingDir.Name; _outputDir = outputDir.Name; - _repo = repo; _force = force; - _skipDependencies = skipDependencies; }); - var console = new TestConsole(); cmd.Invoke(new[] { "-o", "test_package_dir", "working_dir" @@ -48,11 +37,8 @@ public void Args_Paths_BothSpecified() Assert.AreEqual("working_dir", _workingDir); Assert.AreEqual("test_package_dir", _outputDir); - Assert.IsNull(_repo); Assert.IsNotNull(_force); Assert.IsFalse(_force ?? true); - Assert.IsNotNull(_skipDependencies); - Assert.IsFalse(_skipDependencies ?? true); } [TestMethod] @@ -60,9 +46,7 @@ public void Args_Paths_WorkDirSpecified() { string _workingDir = null; string _outputDir = null; - string _repo = null; bool? _force = null; - bool? _skipDependencies = null; var packCommand = new PackCommand(); var cmd = new Command("pack"); @@ -73,12 +57,9 @@ public void Args_Paths_WorkDirSpecified() { _workingDir = workingDir.Name; _outputDir = outputDir.Name; - _repo = repo; _force = force; - _skipDependencies = skipDependencies; }); - var console = new TestConsole(); cmd.Invoke(new[] { "working_dir" @@ -86,11 +67,8 @@ public void Args_Paths_WorkDirSpecified() Assert.AreEqual("working_dir", _workingDir); Assert.AreEqual("Package", _outputDir); - Assert.IsNull(_repo); Assert.IsNotNull(_force); Assert.IsFalse(_force ?? true); - Assert.IsNotNull(_skipDependencies); - Assert.IsFalse(_skipDependencies ?? true); } [TestMethod] @@ -98,9 +76,7 @@ public void Args_Paths_OutDirSpecified() { string _workingDir = null; string _outputDir = null; - string _repo = null; bool? _force = null; - bool? _skipDependencies = null; var packCommand = new PackCommand(); var cmd = new Command("pack"); @@ -111,12 +87,9 @@ public void Args_Paths_OutDirSpecified() { _workingDir = workingDir.Name; _outputDir = outputDir.Name; - _repo = repo; _force = force; - _skipDependencies = skipDependencies; }); - var console = new TestConsole(); cmd.Invoke(new[] { "-o", "test_package_dir" @@ -125,11 +98,8 @@ public void Args_Paths_OutDirSpecified() var curDir = new DirectoryInfo(System.IO.Directory.GetCurrentDirectory()); Assert.AreEqual(curDir.Name, _workingDir); Assert.AreEqual("test_package_dir", _outputDir); - Assert.IsNull(_repo); Assert.IsNotNull(_force); Assert.IsFalse(_force ?? true); - Assert.IsNotNull(_skipDependencies); - Assert.IsFalse(_skipDependencies ?? true); } [TestMethod] @@ -137,9 +107,7 @@ public void Args_Paths_NoneSpecified() { string _workingDir = null; string _outputDir = null; - string _repo = null; bool? _force = null; - bool? _skipDependencies = null; var packCommand = new PackCommand(); var cmd = new Command("pack"); @@ -150,12 +118,9 @@ public void Args_Paths_NoneSpecified() { _workingDir = workingDir.Name; _outputDir = outputDir.Name; - _repo = repo; _force = force; - _skipDependencies = skipDependencies; }); - var console = new TestConsole(); cmd.Invoke(new string[] { }, console); @@ -164,11 +129,8 @@ public void Args_Paths_NoneSpecified() Assert.AreEqual(curDir.Name, _workingDir); Assert.AreEqual("Package", _outputDir); - Assert.IsNull(_repo); Assert.IsNotNull(_force); Assert.IsFalse(_force ?? true); - Assert.IsNotNull(_skipDependencies); - Assert.IsFalse(_skipDependencies ?? true); } } -} +} \ No newline at end of file