forked from GitTools/GitVersion
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor null checks using ArgumentException and ArgumentNullException
Simplify null and whitespace checks by using ArgumentException.ThrowIfNullOrWhiteSpace and ArgumentNullException.ThrowIfNull. This reduces repetitive code and enhances readability across various methods.
- Loading branch information
Showing
9 changed files
with
28 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
using GitVersion.Helpers; | ||
using GitVersion.Testing.Internal; | ||
using LibGit2Sharp; | ||
using Shouldly; | ||
|
||
namespace GitVersion.Testing; | ||
|
||
|
@@ -17,7 +18,7 @@ protected RepositoryFixtureBase(Func<string, Repository> repositoryBuilder) | |
protected RepositoryFixtureBase(Repository repository) | ||
{ | ||
SequenceDiagram = new(); | ||
Repository = repository ?? throw new ArgumentNullException(nameof(repository)); | ||
Repository = repository.ShouldNotBeNull(); | ||
Repository.Config.Set("user.name", "Test"); | ||
Repository.Config.Set("user.email", "[email protected]"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters