Example #1
0
        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());
        }