public void CannotSupportVersion1()
        {
            var endpoint = new Uri("https://someidentityendpoint:35357/v1.0/tokens");
            var userName = "******";
            var password = "******";
            var tenantId = "12345";

            var creds = new OpenStackCredential(endpoint, userName, password, tenantId);

            var client = new IdentityServiceClientDefinition();
            
            Assert.IsFalse(client.IsSupported(creds, string.Empty));
        }
        public async Task CanAuthenticate()
        {
            var creds = GetValidCredentials();
            var token = "someToken";

            this.pocoClient.AuthenticationDelegate = () =>
            {
                creds.SetAccessTokenId(token);
                return Task.Factory.StartNew(() => creds);
            };

            var client = new IdentityServiceClientDefinition().Create(GetValidCredentials(), string.Empty, CancellationToken.None, this.ServiceLocator) as IdentityServiceClient;
            var resp = await client.Authenticate();

            Assert.AreEqual(creds, resp);
            Assert.AreEqual(creds,client.Credential);
        }
 public void Version2Supported()
 {
     var client = new IdentityServiceClientDefinition();
     Assert.IsTrue(client.ListSupportedVersions().Contains("2.0.0.0"));
 }
        public void CanSupportVersion2()
        {
            var client = new IdentityServiceClientDefinition();

            Assert.IsTrue(client.IsSupported(GetValidCredentials(), string.Empty));
        }