Skip to content

Commit

Permalink
Simplify & rename 2 tests to clarify what they do
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveTryon committed Jan 2, 2025
1 parent 50be064 commit 10b76c4
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,19 @@ public void Build_AddDetectorArgsViaAddArgCombineWithOtherDetectorArgs()
}

[TestMethod]
public void Build_WithNullValue()
public void AddArg_WithNullValue_Throws()
{
Assert.ThrowsException<ArgumentNullException>(() => new ComponentDetectionCliArgumentBuilder()
.SourceDirectory("X:/")
.AddArg("ManifestFile", null)
.AddArg("--DirectoryExclusionList", "X:/hello"));
var builder = new ComponentDetectionCliArgumentBuilder();

Assert.ThrowsException<ArgumentNullException>(() => builder.AddArg("ManifestFile", null));
}

[TestMethod]
public void Build_WithInvalidArg()
public void AddArg_WithInvalidArg_Throws()
{
Assert.ThrowsException<ArgumentNullException>(() => new ComponentDetectionCliArgumentBuilder()
.SourceDirectory("X:/")
.AddArg("ManifestFile", "value")
.AddArg("--", "X:/hello"));
var builder = new ComponentDetectionCliArgumentBuilder();

Assert.ThrowsException<ArgumentNullException>(() => builder.AddArg("--", "X:/hello"));
}

[TestMethod]
Expand Down

0 comments on commit 10b76c4

Please sign in to comment.