public void GivenDefaultSettingsRequested_RedirectToAuthenticate_ReturnsAUri() { // Arrange. var facebookProvider = new FacebookProvider("aa", "bb", new Uri("http://www.2p1s.com")); var facebookAuthenticationServiceSettings = new FacebookAuthenticationServiceSettings(); // Act. var result = facebookProvider.RedirectToAuthenticate(facebookAuthenticationServiceSettings); // Assert. Assert.NotNull(result); Assert.Equal("https://www.facebook.com/dialog/oauth?client_id=aa&scope=email&redirect_uri=http://www.2p1s.com/", result.AbsoluteUri); }
public void GivenMobileAndDisplayAreRequested_RedirectToAuthenticate_ReturnsAUri() { // Arrange. var facebookProvider = new FacebookProvider("aa", "bb", new Uri("http://www.2p1s.com")); var facebookAuthenticationServiceSettings = new FacebookAuthenticationServiceSettings { IsMobile = true, Display = DisplayType.Touch }; // Act. var result = facebookProvider.RedirectToAuthenticate(facebookAuthenticationServiceSettings); // Assert. Assert.NotNull(result); Assert.Equal("https://m.facebook.com/dialog/oauth?client_id=aa&scope=email&display=touch&redirect_uri=http://www.2p1s.com/", result.AbsoluteUri); }