Skip to content

Commit 49d30e7

Browse files
committed
Remove Assert.DoesNotThrow usage
1 parent 342e896 commit 49d30e7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

LibGit2Sharp.Tests/StageFixture.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ public void CanStageAnUnknownFileWithLaxUnmatchedExplicitPathsValidation(string
101101
Assert.Null(repo.Index[relativePath]);
102102
Assert.Equal(status, repo.RetrieveStatus(relativePath));
103103

104-
Assert.DoesNotThrow(() => Commands.Stage(repo, relativePath));
105-
Assert.DoesNotThrow(() => Commands.Stage(repo, relativePath, new StageOptions { ExplicitPathsOptions = new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false } }));
104+
Commands.Stage(repo, relativePath);
105+
Commands.Stage(repo, relativePath, new StageOptions { ExplicitPathsOptions = new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false } });
106106

107107
Assert.Equal(status, repo.RetrieveStatus(relativePath));
108108
}
@@ -405,8 +405,7 @@ public void CanSuccessfullyStageTheContentOfAModifiedFileOfTheSameSizeWithinTheS
405405

406406
Commands.Stage(repo, "test.txt");
407407

408-
Assert.DoesNotThrow(() => repo.Commit(
409-
"Commit", Constants.Signature, Constants.Signature));
408+
repo.Commit("Commit", Constants.Signature, Constants.Signature);
410409
}
411410
}
412411
}

LibGit2Sharp.Tests/UnstageFixture.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ public void CanUnstageUnknownPathsWithLaxUnmatchedExplicitPathsValidation(string
125125
{
126126
Assert.Equal(currentStatus, repo.RetrieveStatus(relativePath));
127127

128-
Assert.DoesNotThrow(() => Commands.Unstage(repo, relativePath, new ExplicitPathsOptions() { ShouldFailOnUnmatchedPath = false }));
128+
Commands.Unstage(repo, relativePath, new ExplicitPathsOptions() { ShouldFailOnUnmatchedPath = false });
129+
129130
Assert.Equal(currentStatus, repo.RetrieveStatus(relativePath));
130131
}
131132
}
@@ -201,8 +202,9 @@ public void CanUnstageUnknownPathsAgainstAnOrphanedHeadWithLaxUnmatchedExplicitP
201202

202203
Assert.Equal(currentStatus, repo.RetrieveStatus(relativePath));
203204

204-
Assert.DoesNotThrow(() => Commands.Unstage(repo, relativePath));
205-
Assert.DoesNotThrow(() => Commands.Unstage(repo, relativePath, new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false }));
205+
Commands.Unstage(repo, relativePath);
206+
Commands.Unstage(repo, relativePath, new ExplicitPathsOptions { ShouldFailOnUnmatchedPath = false });
207+
206208
Assert.Equal(currentStatus, repo.RetrieveStatus(relativePath));
207209
}
208210
}

0 commit comments

Comments
 (0)