public void ShouldParseZeroLocksFormat2()
        {
            var output = new[] {
                null,
                "0 lock (s) matched query."
            };

            var expected = new GitLock[0];

            AssertProcessOutput(output, expected);
        }
        public void GitLockComparisons()
        {
            GitLock lock1 = GitLock.Default;
            GitLock lock2 = GitLock.Default;

            Assert.IsTrue(lock1.Equals(lock2));
            Assert.IsTrue(lock1 == lock2);
            // these are the defaults
            lock1 = new GitLock(null, SPath.Default, GitUser.Default, DateTimeOffset.MinValue);
            lock2 = new GitLock();
            Assert.IsTrue(lock1.Equals(lock2));
            Assert.IsTrue(lock1 == lock2);
        }
Example #3
0
        public static void AssertNotEqual(this GitLock gitLock, GitLock other)
        {
            Action action = () => gitLock.AssertEqual(other);

            action.ShouldThrow <AssertionException>();
        }
Example #4
0
 public static void AssertEqual(this GitLock gitLock, GitLock other)
 {
     gitLock.Path.Should().Be(other.Path);
     gitLock.FullPath.Should().Be(other.FullPath);
     gitLock.User.Should().Be(other.User);
 }