Exemplo n.º 1
0
        public void GetTenantWithoutParameters()
        {
            var cmdlt = new GetAzureRMTenantCommand();
            // Setup
            cmdlt.CommandRuntime = commandRuntimeMock;

            // Act
            Login("2c224e7e-3ef5-431d-a57b-e71f4662e3a6", null);
            cmdlt.InvokeBeginProcessing();
            cmdlt.ExecuteCmdlet();
            cmdlt.InvokeEndProcessing();

            Assert.True(commandRuntimeMock.OutputPipeline.Count == 2);
            Assert.Equal("72f988bf-86f1-41af-91ab-2d7cd011db47", ((AzureTenant)commandRuntimeMock.OutputPipeline[1]).Id.ToString());
            Assert.Equal("microsoft.com", ((AzureTenant)commandRuntimeMock.OutputPipeline[1]).Domain);
        }
Exemplo n.º 2
0
        public void GetTenantWithoutParameters()
        {
            var cmdlt = new GetAzureRMTenantCommand();

            // Setup
            cmdlt.CommandRuntime = CommandRuntimeMock;

            // Act
            Login(SubscriptionId, null);
            cmdlt.InvokeBeginProcessing();
            cmdlt.ExecuteCmdlet();
            cmdlt.InvokeEndProcessing();

            Assert.True(CommandRuntimeMock.OutputPipeline.Count >= 2);
            Assert.Equal(TenantId, ((PSAzureTenant)CommandRuntimeMock.OutputPipeline[1]).Id.ToString());
        }
Exemplo n.º 3
0
        public void GetTenantWithoutParameters()
        {
            var cmdlt = new GetAzureRMTenantCommand();

            // Setup
            cmdlt.CommandRuntime = commandRuntimeMock;

            // Act
            Login("2c224e7e-3ef5-431d-a57b-e71f4662e3a6", null);
            cmdlt.InvokeBeginProcessing();
            cmdlt.ExecuteCmdlet();
            cmdlt.InvokeEndProcessing();

            Assert.True(commandRuntimeMock.OutputPipeline.Count == 3);
            Assert.Equal("72f988bf-86f1-41af-91ab-2d7cd011db47", ((PSAzureTenant)commandRuntimeMock.OutputPipeline[1]).Id.ToString());
        }