IOpenStackCredential GetValidCreds()
        {
            var catalog = new OpenStackServiceCatalog();
            catalog.Add(new OpenStackServiceDefinition("Neutron", "Network Service",
                new List<OpenStackServiceEndpoint>()
                {
                    new OpenStackServiceEndpoint(endpoint, string.Empty, "some version", "some version info", "1,2,3")
                }));

            var creds = new OpenStackCredential(new Uri(this.endpoint), "SomeUser", "Password", "SomeTenant");
            creds.SetAccessTokenId(this.authId);
            creds.SetServiceCatalog(catalog);
            return creds;
        }
        public void CanSetServiceCatalog()
        {
            var endpoint = new Uri("https://auth.someplace.com/authme");
            var userName = "******";
            var password = "******";
            var tenantId = "12345";

            var catalog = new OpenStackServiceCatalog();

            var cred = new OpenStackCredential(endpoint, userName, password, tenantId);
            cred.SetServiceCatalog(catalog);

            Assert.AreEqual(catalog, cred.ServiceCatalog);
        }
        public void CannotSetServiceCatalogWithNullToken()
        {
            var endpoint = new Uri("https://auth.someplace.com/authme");
            var userName = "******";
            var password = "******";
            var tenantId = "12345";

            var cred = new OpenStackCredential(endpoint, userName, password, tenantId);
            cred.SetServiceCatalog(null);
        }