コード例 #1
0
        public void WhenCommitIsNotFound_ThrowAnNotFoundCommitException()
        {
            var notExistingSha = "notExistingSha";
            var result         = Assert.Throws <CommitNotFoundException>(() => _provider.GetCommitDetails(notExistingSha));

            Assert.True(result.Message.Contains(notExistingSha));
        }
コード例 #2
0
        public void WhenSha_IsNull_throwAnArgumentNullException()
        {
            var repository = NSubstitute.Substitute.For <IRepository>();
            var provider   = new CommitProvider(repository);

            Assert.Throws <ArgumentNullException>(() => provider.GetCommitDetails(null));
        }