public void PromoteScriptAction() { var promoteCmdlet = new SetAzureHDInsightPersistedScriptActionCommand { CommandRuntime = commandRuntimeMock.Object, HDInsightManagementClient = hdinsightManagementMock.Object, ClusterName = ClusterName, ResourceGroupName = ResourceGroupName, ScriptExecutionId = scriptActionDetail.ScriptExecutionId }; hdinsightManagementMock.Setup(c => c.PromoteScript(ResourceGroupName, ClusterName, scriptActionDetail.ScriptExecutionId)) .Returns(new OperationResource { ErrorInfo = null, StatusCode = HttpStatusCode.OK, State = AsyncOperationState.Succeeded }) .Verifiable(); promoteCmdlet.ExecuteCmdlet(); commandRuntimeMock.VerifyAll(); hdinsightManagementMock.VerifyAll(); hdinsightManagementMock.Verify(c => c.PromoteScript(ResourceGroupName, ClusterName, scriptActionDetail.ScriptExecutionId), Times.Once); }
public void PromoteScriptAction() { var promoteCmdlet = new SetAzureHDInsightPersistedScriptActionCommand { CommandRuntime = commandRuntimeMock.Object, HDInsightManagementClient = hdinsightManagementMock.Object, ClusterName = ClusterName, ResourceGroupName = ResourceGroupName, ScriptExecutionId = scriptActionDetail.ScriptExecutionId.Value }; hdinsightManagementMock.Setup(c => c.PromoteScript(ResourceGroupName, ClusterName, scriptActionDetail.ScriptExecutionId.Value)) .Verifiable(); promoteCmdlet.ExecuteCmdlet(); commandRuntimeMock.VerifyAll(); hdinsightManagementMock.VerifyAll(); hdinsightManagementMock.Verify(c => c.PromoteScript(ResourceGroupName, ClusterName, scriptActionDetail.ScriptExecutionId.Value), Times.Once); }
public void PromoteScriptAction() { var promoteCmdlet = new SetAzureHDInsightPersistedScriptActionCommand { CommandRuntime = commandRuntimeMock.Object, HDInsightManagementClient = hdinsightManagementMock.Object, ClusterName = ClusterName, ResourceGroupName = ResourceGroupName, ScriptExecutionId = scriptActionDetail.ScriptExecutionId }; hdinsightManagementMock.Setup(c => c.PromoteScript(ResourceGroupName, ClusterName, scriptActionDetail.ScriptExecutionId)) .Returns(new OperationResource { ErrorInfo = null, StatusCode = HttpStatusCode.OK, State = AsyncOperationState.Succeeded }) .Verifiable(); promoteCmdlet.ExecuteCmdlet(); commandRuntimeMock.VerifyAll(); hdinsightManagementMock.VerifyAll(); hdinsightManagementMock.Verify(c => c.PromoteScript(ResourceGroupName, ClusterName, scriptActionDetail.ScriptExecutionId), Times.Once); }