Ejemplo n.º 1
0
        public async void WhenExecuteThenCommandIsNotExecutable()
        {
            const string StopBuildUrl     = "stop url";
            var          stopBuildCommand = new StopBuildCommand(this.jenkinsRestClientMock.Object, StopBuildUrl);

            Check.That(stopBuildCommand.CanExecute(null)).IsTrue();

            await stopBuildCommand.ExecuteAsync();

            Check.That(stopBuildCommand.CanExecute(null)).IsFalse();
        }
Ejemplo n.º 2
0
        public void WhenStopBuildUrlIsEmptyThenCommandIsNotExecutable()
        {
            var stopBuildCommand = new StopBuildCommand(this.jenkinsRestClientMock.Object, string.Empty);

            Check.That(stopBuildCommand.CanExecute(null)).IsFalse();
        }