Ejemplo n.º 1
0
        public void CanRevokeRdpAccess()
        {
            hdinsightManagementMock.Setup(
                c =>
                c.ConfigureRdp(ResourceGroupName, ClusterName,
                               It.Is <RDPSettingsParameters>(
                                   param =>
                                   param.OsProfile.LinuxOperatingSystemProfile == null &&
                                   param.OsProfile.WindowsOperatingSystemProfile.RdpSettings == null)))
            .Returns(new HDInsightLongRunningOperationResponse
            {
                Error      = null,
                StatusCode = HttpStatusCode.OK,
                Status     = OperationStatus.Succeeded
            })
            .Verifiable();

            revokecmdlet.ExecuteCmdlet();

            commandRuntimeMock.VerifyAll();
        }