public void WhenHelpOptionIsPassedItPrintsUsage(string helpArg) { var cmd = new ListP2PsCommand().Execute(helpArg); cmd.Should().Pass(); cmd.StdOut.Should().Be(HelpText); }
public void WhenNoProjectReferencesArePresentInTheProjectItPrintsError() { var lib = NewLib(); var cmd = new ListP2PsCommand() .WithProject(lib.CsProjPath) .Execute(); cmd.Should().Pass(); cmd.StdOut.Should().Be($"There are no Project to Project references in project {lib.CsProjPath}. ;; Project to Project is the type of the item being requested (project, package, p2p) and {lib.CsProjPath} is the object operated on (a project file or a solution file). "); }
public void WhenNoProjectReferencesArePresentInTheProjectItPrintsError() { var lib = NewLib(); var cmd = new ListP2PsCommand() .WithProject(lib.CsProjPath) .Execute(); cmd.Should().Pass(); cmd.StdOut.Should().Contain("There are no Project to Project references in project"); }
public void ItPrintsSingleReference() { var lib = NewLib("ItPrintsSingleReference", "lib"); string ref1 = NewLib("ItPrintsSingleReference", "ref").CsProjPath; AddValidRef(ref1, lib); var cmd = new ListP2PsCommand() .WithProject(lib.CsProjPath) .Execute(); cmd.Should().Pass(); cmd.StdOut.Should().Contain("Project reference(s)"); cmd.StdOut.Should().Contain(@"..\ItPrintsSingleReferenceref\ItPrintsSingleReferenceref.csproj"); }
public void ItPrintsSingleReference() { var lib = NewLib(); string ref1 = "someref.csproj"; AddFakeRef(ref1, lib); var cmd = new ListP2PsCommand() .WithProject(lib.CsProjPath) .Execute(); cmd.Should().Pass(); cmd.StdOut.Should().Contain("Project reference(s)"); cmd.StdOut.Should().Contain(ref1); }
public void ItPrintsSingleReference() { const string OutputText = @"Project reference(s) -------------------- ..\ItPrintsSingleReferenceref\ItPrintsSingleReferenceref.csproj"; var lib = NewLib("ItPrintsSingleReference", "lib"); string ref1 = NewLib("ItPrintsSingleReference", "ref").CsProjPath; AddValidRef(ref1, lib); var cmd = new ListP2PsCommand() .WithProject(lib.CsProjPath) .Execute(); cmd.Should().Pass(); cmd.StdOut.Should().Be(OutputText); }