Beispiel #1
0
        public ApiResult <Object> Remove(InputScript configuration)
        {
            var cmd = new RemoveInputScript(scriptProvider, storageProvider, configuration);

            cmd.Execute();
            return(cmd.Result);
        }
Beispiel #2
0
        public void SuccessReturnsFalse()
        {
            cmd = new RemoveInputScript(scriptProvider, storageProvider, notOkScript);
            cmd.Execute();
            var result = cmd.Result;

            Assert.IsNotNull(result);
            Assert.IsFalse(result.Success);

            scriptProviderMock.Verify(v => v.RemoveScript(It.Is <InputScript>(s => s.Equals(notOkScript))), Times.Once);
            storageProviderMock.Verify(v => v.RemoveScript(It.Is <InputScript>(s => s.Equals(notOkScript))), Times.Never);
        }
        public void SuccessReturnsTrue()
        {
            cmd = new RemoveInputScript(scriptProvider, storageProvider, okScript);
            cmd.Execute();
            var result = cmd.Result;

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Success);

            scriptProviderMock.Verify(v => v.RemoveScript(It.Is<InputScript>(s => s.Equals(okScript))), Times.Once);
            storageProviderMock.Verify(v => v.RemoveScript(It.Is<InputScript>(s => s.Equals(okScript))), Times.Once);
        }
Beispiel #4
0
 public ApiResult<Object> Remove(InputScript configuration)
 {
     var cmd = new RemoveInputScript(scriptProvider, storageProvider, configuration);
     cmd.Execute();
     return cmd.Result;
 }