public void GetBatchSubscriptionQuotasTest() { List <PSBatchSubscriptionQuotas> pipelineOutput = new List <PSBatchSubscriptionQuotas>(); // Return a pre-built object when the command is issued. string location = "westus"; PSBatchSubscriptionQuotas quotas = new PSBatchSubscriptionQuotas(location, new SubscriptionQuotasGetResult(accountQuota: 5)); batchClientMock.Setup(b => b.GetSubscriptionQuotas(location)).Returns(quotas); cmdlet.Location = location; cmdlet.ExecuteCmdlet(); // Verify the returned object was written to the pipeline. commandRuntimeMock.Verify(r => r.WriteObject(quotas), Times.Once()); }
public override void ExecuteCmdlet() { PSBatchSubscriptionQuotas quotas = BatchClient.GetSubscriptionQuotas(this.Location); WriteObject(quotas); }
protected override void ProcessRecord() { PSBatchSubscriptionQuotas quotas = BatchClient.GetSubscriptionQuotas(this.Location); WriteObject(quotas); }