public void GetAuthorizationUrl_must_return_url_without_scope_when_called_without_scope_() { var target = new APIAuthorizer("client", "key", new Uri("https://www.mystore.com/manager")); Assert.AreEqual("https://www.mystore.com/manager/oauth/authorization.aspx?client_id=client", target.GetAuthorizationUrl(null)); }
public void GetAuthorizationUrl_must_return_url_with_scope_when_called_with_valid_scope() { var target = new APIAuthorizer("client", "key", new Uri("https://www.mystore.com/manager")); Assert.AreEqual("https://www.mystore.com/manager/oauth/authorization.aspx?client_id=client&scope=readDepartment,writeOrder", target.GetAuthorizationUrl(new string[] { "readDepartment", "writeOrder" })); }
public void GetAuthorizationUrl_must_return_url_without_additional_slash_when_storeurl_ends_with_slash() { var target = new APIAuthorizer("client", "key", new Uri("https://www.mystore.com/manager/")); Assert.AreEqual("https://www.mystore.com/manager/oauth/authorization.aspx?client_id=client", target.GetAuthorizationUrl(null)); }