예제 #1
0
        public void Test_Create_With_Default_Values()
        {
            var builder = new LoginFormUriBuilder(ClientId, RedirectUri);
            var uri     = builder.Create();

            Assert.That(uri.ToString(), Is.EqualTo("https://soundcloud.com/connect?client_id=ClientId&response_type=token&display=&scope=&redirect_uri=RedirectUri"));
        }
예제 #2
0
        public Uri GetLoginUri()
        {
            var builder = new LoginFormUriBuilder("63e1371f109c5933d392ddd2f6ffc923", "sharpsound://login/");

            builder.Display      = Display.Popup;
            builder.ResponseType = ResponseType.Token;
            builder.Scope        = Scope.NonExpiring;
            return(builder.Create());
        }
예제 #3
0
        public void Test_Create_With_Custom_Values()
        {
            var builder = new LoginFormUriBuilder(ClientId, RedirectUri);

            builder.Display      = Display.Popup;
            builder.Scope        = Scope.NonExpiring;
            builder.ResponseType = ResponseType.Code;

            var uri = builder.Create();

            Assert.That(uri.ToString(), Is.EqualTo("https://soundcloud.com/connect?client_id=ClientId&response_type=code&display=popup&scope=non-expiring&redirect_uri=RedirectUri"));
        }
예제 #4
0
        public void Test_Get_RedirectUri()
        {
            var builder = new LoginFormUriBuilder(ClientId, RedirectUri);

            Assert.That(builder.RedirectUri, Is.EqualTo(RedirectUri));
        }