public void Constructor_Succeeds()
        {
            var          serverUri = new Uri(GoodUriString);
            const string basePath  = "/";

#pragma warning disable CS0618 // Type or member is obsolete
            var result = new GitToolCommandLine(_commandLineToolSucceedsMock.Object, serverUri, basePath);
#pragma warning restore CS0618 // Type or member is obsolete

            Assert.That(result, Is.Not.Null);
        }
        public void Add_Succeeds()
        {
            var          serverUri = new Uri(GoodUriString);
            const string basePath  = "/";

#pragma warning disable CS0618 // Type or member is obsolete
            var tool = new GitToolCommandLine(_commandLineToolSucceedsMock.Object, serverUri, basePath);
#pragma warning restore CS0618 // Type or member is obsolete

            Assert.That(() => tool.Add(), Throws.Nothing);
            _commandLineToolSucceedsMock.Verify(
                x => x.ExecuteCommand(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <int>()),
                Times.Once);
        }
        public void Clone_Fails()
        {
            var          serverUri = new Uri(GoodUriString);
            const string basePath  = "/";

#pragma warning disable CS0618 // Type or member is obsolete
            var tool = new GitToolCommandLine(_commandLineToolFailsMock.Object, serverUri, basePath);
#pragma warning restore CS0618 // Type or member is obsolete

            Assert.That(() => tool.Clone(), Throws.TypeOf <InvalidOperationException>());
            _commandLineToolFailsMock.Verify(
                x => x.ExecuteCommand(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <int>()),
                Times.Once);
        }
        public void CheckOut_Succeeds([Values] bool branchProvided)
        {
            var          serverUri = new Uri(GoodUriString);
            const string basePath  = "/";

#pragma warning disable CS0618 // Type or member is obsolete
            var tool = new GitToolCommandLine(_commandLineToolSucceedsMock.Object, serverUri, basePath);
#pragma warning restore CS0618 // Type or member is obsolete

            var branchName = branchProvided
                ? "testBranch"
                : null;

            Assert.That(() => tool.CheckOut(branchName), Throws.Nothing);
            _commandLineToolSucceedsMock.Verify(
                x => x.ExecuteCommand(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <int>()),
                Times.Once);
        }