public void SerializeBigNumbersCorrectly() { var parameters = new Dictionary<string, object>(); parameters["object_id"] = 10150098461530576; var fb = new FuntownClient(); string json = fb.SerializeJson(parameters); Assert.Equal("{\"object_id\":10150098461530576}", json); }
public void CorrectlyParsesSignedRequest() { var fb = new FuntownClient(); var signedRequest = (IDictionary<string, object>)fb.ParseSignedRequest(AppSecret, SignedRequest); Assert.IsAssignableFrom<IDictionary<string, object>>(signedRequest); Assert.IsType<JsonObject>(signedRequest); Assert.Equal("HMAC-SHA256", signedRequest["algorithm"]); Assert.Equal(1336845600L, signedRequest["expires"]); Assert.Equal(1336841938L, signedRequest["issued_at"]); Assert.Equal("AAAB3grfTrXwBAIYmsIDKbgepKdL6M5IK3v4pMGAi6OEKWLzX91bZBC4ZATzadiLnbK4k8CBrSbo5ZCqW5a7aZA3F5DSHMIh3WarnNVLRGTg2TWLbpJ4z", signedRequest["oauth_token"]); }
public ContainsMobileInParameter() { _fb = new FuntownClient(); }
public GetLoginUrlTests() { _fb = new FuntownClient(); }
public void ThrowsArgumentNullExceptionIfSignedRequestIsNull() { var fb = new FuntownClient(); Assert.Throws<ArgumentNullException>(() => fb.ParseSignedRequest(AppSecret, null)); }
public void ThrowsArgumentNullExceptionIfAppSecretIsEmpty() { var fb = new FuntownClient(); Assert.Throws<ArgumentNullException>(() => fb.ParseSignedRequest(string.Empty, SignedRequest)); }
public GivenAUrlContainingAccessTokenAndExpiresInFragmentThen() { _fb = new FuntownClient(); }
public GivenAUrlContainingErrorReasonQuerystringThen() { _fb = new FuntownClient(); }
public GivenErrorReasonAsUserDeniedThen() { _fb = new FuntownClient(); }
public GivenErrorDescriptionAsTheUserDeniedYourRequestThen() { _fb = new FuntownClient(); }
public GivenCodeThen() { _fb = new FuntownClient(); }
public ConstructorAccessTokenTests() { _fb = new FuntownClient("dummy_access_token"); }
public DefaultConstructorTests() { _fb = new FuntownClient(); }