public void CreateWithURI_CreatesValidServiceBinding()
        {
            var s = new Service()
            {
                Label       = "user-provided",
                Tags        = Array.Empty <string>(),
                Name        = "mySSO",
                Credentials = new Credential()
                {
                    { "client_id", new Credential("clientId") },
                    { "client_secret", new Credential("clientSecret") },
                    { "uri", new Credential("uaa://sso.login.system.testcloud.com") }
                }
            };
            var factory = new SsoServiceInfoFactory();
            var info    = factory.Create(s) as SsoServiceInfo;

            Assert.NotNull(info);
            Assert.Equal("mySSO", info.Id);
            Assert.Equal("clientId", info.ClientId);
            Assert.Equal("clientSecret", info.ClientSecret);
            Assert.Equal("https://sso.login.system.testcloud.com", info.AuthDomain);
        }
        public void Create_CreatesValidServiceBinding()
        {
            Service s = new Service()
            {
                Label       = "p-identity",
                Tags        = new string[0],
                Name        = "mySSO",
                Plan        = "sso",
                Credentials = new Credential()
                {
                    { "client_id", new Credential("clientId") },
                    { "client_secret", new Credential("clientSecret") },
                    { "auth_domain", new Credential("https://sso.login.system.testcloud.com") }
                }
            };
            SsoServiceInfoFactory factory = new SsoServiceInfoFactory();
            var info = factory.Create(s) as SsoServiceInfo;

            Assert.NotNull(info);
            Assert.Equal("mySSO", info.Id);
            Assert.Equal("clientId", info.ClientId);
            Assert.Equal("clientSecret", info.ClientSecret);
            Assert.Equal("https://sso.login.system.testcloud.com", info.AuthDomain);
        }