ExecuteCmdlet() 공개 메소드

public ExecuteCmdlet ( ) : void
리턴 void
예제 #1
0
        public void CanCreateClusterConfigWithDataLakeStoreParameters()
        {
            var newclusteridentitycmdlet = new NewAzureHDInsightClusterConfigCommand()
            {
                CommandRuntime = commandRuntimeMock.Object,
                HDInsightManagementClient = hdinsightManagementMock.Object,
                ObjectId = ObjectId,
                CertificateFilePath = Certificate,
                AadTenantId = AadTenantId,
                CertificatePassword = CertificatePassword
            };

            newclusteridentitycmdlet.ExecuteCmdlet();
            commandRuntimeMock.Verify(
                f =>
                    f.WriteObject(
                        It.Is<AzureHDInsightConfig>(
                            c =>
                                c.AADTenantId == AadTenantId &&
                                c.CertificatePassword == CertificatePassword &&
                                c.ObjectId == ObjectId &&
                                c.CertificateFilePath == Certificate
                                )),
                Times.Once);
        }
예제 #2
0
        public void CanCreateDataLakeClusterWithCertificationFileContents()
        {
            var clusterIdentityCmdlet = new NewAzureHDInsightClusterConfigCommand()
            {
                CommandRuntime = commandRuntimeMock.Object,
                HDInsightManagementClient = hdinsightManagementMock.Object,
                ObjectId = ObjectId,
                CertificateFileContents = CertificateFileContents,
                AadTenantId = AadTenantId,
                CertificatePassword = CertificatePassword
            };

            clusterIdentityCmdlet.ExecuteCmdlet();
            commandRuntimeMock.Verify(
                f =>
                    f.WriteObject(
                        It.Is<AzureHDInsightConfig>(
                            c =>
                                c.AADTenantId == AadTenantId &&
                                c.CertificatePassword == CertificatePassword &&
                                c.ObjectId == ObjectId &&
                                c.CertificateFileContents == CertificateFileContents
                                )),
                Times.Once);
        }