public void Should_Add_Mandatory_Arguments_When_Using_Token() { // Given var fixture = new GitReleaseManagerAssetsAdderFixture(); fixture.UseToken(); // When var result = fixture.Run(); // Then Assert.Equal("addasset --token \"token\" " + "-o \"repoOwner\" -r \"repo\" -t \"0.1.0\" " + "-a \"/temp/asset1.txt\"", result.Args); }
public void Should_Use_GitReleaseManager_Executable_From_Tool_Path_If_Provided_On_Windows_When_Using_Token(string toolPath, string expected) { // Given var fixture = new GitReleaseManagerAssetsAdderFixture(); fixture.UseToken(); fixture.Settings.ToolPath = toolPath; fixture.GivenSettingsToolPathExist(); // When var result = fixture.Run(); // Then Assert.Equal(expected, result.Path.FullPath); }
public void Should_Add_LogFilePath_To_Arguments_If_Set_When_Using_Token() { // Given var fixture = new GitReleaseManagerAssetsAdderFixture(); fixture.UseToken(); fixture.Settings.LogFilePath = @"/temp/log.txt"; // When var result = fixture.Run(); // Then Assert.Equal("addasset --token \"token\" " + "-o \"repoOwner\" -r \"repo\" -t \"0.1.0\" " + "-a \"/temp/asset1.txt\" " + "-l \"/temp/log.txt\"", result.Args); }
public void Should_All_NoLogo_To_Arguments_If_Set_When_Using_Token() { // Given var fixture = new GitReleaseManagerAssetsAdderFixture(); fixture.UseToken(); fixture.Settings.NoLogo = true; // When var result = fixture.Run(); // Then Assert.Equal("addasset --token \"token\" " + "-o \"repoOwner\" -r \"repo\" -t \"0.1.0\" " + "-a \"/temp/asset1.txt\" " + "--no-logo", result.Args); }