public void GetClientWithoutCredentialsorSubscriptionCertificateThrows() { ClusterDetails cluster = CmdletScenariosTestCaseBase.GetHttpAccessEnabledCluster(); using (var cmd = new GetAzureHDInsightJobCommand()) { cmd.Cluster = cluster.Name; cmd.GetClient(cmd.Cluster); } }
public void GetJobSubmissionCredentialsThrowsInvalidOperationException() { string invalidClusterName = Guid.NewGuid().ToString("N"); var getClustersCommand = new GetAzureHDInsightJobCommand(); try { getClustersCommand.GetClient(invalidClusterName); Assert.Fail("Should have failed."); } catch (InvalidOperationException invalidOperationException) { Assert.AreEqual("Expected either a Subscription or Credential parameter.", invalidOperationException.Message); } }