public void WhenCommitIsNotFound_ThrowAnNotFoundCommitException() { var notExistingSha = "notExistingSha"; var result = Assert.Throws <CommitNotFoundException>(() => _provider.GetCommitDetails(notExistingSha)); Assert.True(result.Message.Contains(notExistingSha)); }
public void WhenSha_IsNull_throwAnArgumentNullException() { var repository = NSubstitute.Substitute.For <IRepository>(); var provider = new CommitProvider(repository); Assert.Throws <ArgumentNullException>(() => provider.GetCommitDetails(null)); }