Пример #1
0
        public void TestProvisioningMethods()
        {
            var request    = new AddonProvisionRequest();
            var properties = new List <AddonProperty>();

            properties.Add(new AddonProperty()
            {
                Key = "RabbitEndpoint", Value = "hqs-engineer15.apprendalabs.local"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitAdminPort", Value = "15672"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitPort", Value = "5672"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitAdminUser", Value = "guest"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitAdminPassword", Value = "guest"
            });
            properties.Add(new AddonProperty()
            {
                Key = "DeveloperAlias", Value = "unit"
            });
            properties.Add(new AddonProperty()
            {
                Key = "InstanceAlias", Value = "sampleId"
            });

            request.Manifest            = ReadTestManifest("UnitTestAddOnManifest.xml");
            request.Manifest.Properties = properties;

            var addon  = new RabbitMQAddOn.RabbitMQAddOn();
            var result = addon.Provision(request);

            Assert.IsTrue(result.IsSuccess);

            var deprovisionRequest = new AddonDeprovisionRequest();

            deprovisionRequest.Manifest            = ReadTestManifest("UnitTestAddOnManifest.xml");
            deprovisionRequest.Manifest.Properties = properties;

            var deprovisionResult = addon.Deprovision(deprovisionRequest);

            Assert.IsTrue(deprovisionResult.IsSuccess);
        }
Пример #2
0
        public void TestTestMethod()
        {
            var testRequest = new AddonTestRequest();

            var properties = new List <AddonProperty>();

            properties.Add(new AddonProperty()
            {
                Key = "RabbitEndpoint", Value = "hqs-engineer15.apprendalabs.local"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitAdminPort", Value = "15672"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitPort", Value = "5672"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitAdminUser", Value = "guest"
            });
            properties.Add(new AddonProperty()
            {
                Key = "RabbitAdminPassword", Value = "guest"
            });
            properties.Add(new AddonProperty()
            {
                Key = "DeveloperAlias", Value = "unit"
            });
            properties.Add(new AddonProperty()
            {
                Key = "InstanceAlias", Value = "sampleId"
            });

            testRequest.Manifest            = ReadTestManifest("UnitTestAddOnManifest.xml");
            testRequest.Manifest.Properties = properties;

            var addon  = new RabbitMQAddOn.RabbitMQAddOn();
            var result = addon.Test(testRequest);

            Assert.IsNotNull(result);
        }