Used to get the oAuth WRAP token from ACS for the service bus instance
상속: Elastacloud.AzureManagement.Fluent.Commands.Services.ServiceCommand
        public void GetManagementTokenCommand_HttpVerb_Post()
        {
            _mockQueryManager.Setup(
                t =>
                t.MakeASyncRequest(It.IsAny<ServiceManagementRequest>(), It.IsAny<ServiceManager.AsyncResponseParser>(),
                                   It.IsAny<ServiceManager.AsyncResponseException>()));
            var command = new GetManagementTokenCommand("bob", "bill");

            command.SitAndWait.Set();
            command.Execute();

            _mockQueryManager.Verify(
                t =>
                t.MakeASyncRequest(It.Is<ServiceManagementRequest>(tRequest => tRequest.HttpVerb == "POST"), It.IsAny<ServiceManager.AsyncResponseParser>(),
                                   It.IsAny<ServiceManager.AsyncResponseException>()), Times.Once());
        }
        public void GetManagementTokenCommand_CommandUri_ContainsNamespace()
        {
            _mockQueryManager.Setup(
                t =>
                t.MakeASyncRequest(It.IsAny<ServiceManagementRequest>(), It.IsAny<ServiceManager.AsyncResponseParser>(),
                                   It.IsAny<ServiceManager.AsyncResponseException>()));
            var command = new GetManagementTokenCommand("bobthisisanamespaces", "bill");

            command.SitAndWait.Set();
            command.Execute();

            _mockQueryManager.Verify(
                t =>
                t.MakeASyncRequest(It.Is<ServiceManagementRequest>(tRequest => tRequest.Body.Contains("bobthisisanamespaces")), It.IsAny<ServiceManager.AsyncResponseParser>(),
                                   It.IsAny<ServiceManager.AsyncResponseException>()), Times.Once());
        }
예제 #3
0
 public ServiceBusManager(string @namespace, string key)
 {
     var command = new GetManagementTokenCommand(@namespace, key);
     command.Execute();
 }