Package com.restfb

Examples of com.restfb.FakeWebRequestor


public class EndpointBuilderTest {
   
    @Test
    public void version1Test() {
        FakeWebRequestor wr = new FakeWebRequestor();
        DefaultFacebookClient client = new DefaultFacebookClient("12345", wr, new DefaultJsonMapper(), Version.VERSION_1_0);
        String respstring = client.fetchObject("/me", String.class);
        assertEquals("https://graph.facebook.com/v1.0/me?access_token=12345&format=json", respstring);
    }
View Full Code Here


        assertEquals("https://graph.facebook.com/v1.0/me?access_token=12345&format=json", respstring);
    }
   
    @Test
    public void version2Test() {
        FakeWebRequestor wr = new FakeWebRequestor();
        DefaultFacebookClient client = new DefaultFacebookClient("12345", wr, new DefaultJsonMapper(), Version.VERSION_2_0);
        String respstring = client.fetchObject("/me", String.class);
        assertEquals("https://graph.facebook.com/v2.0/me?access_token=12345&format=json", respstring);
    }
View Full Code Here

        assertEquals("https://graph.facebook.com/v2.0/me?access_token=12345&format=json", respstring);
    }
   
    @Test
    public void version21Test() {
        FakeWebRequestor wr = new FakeWebRequestor();
        DefaultFacebookClient client = new DefaultFacebookClient("12345", wr, new DefaultJsonMapper(), Version.VERSION_2_1);
        String respstring = client.fetchObject("/me", String.class);
        assertEquals("https://graph.facebook.com/v2.1/me?access_token=12345&format=json", respstring);
    }
View Full Code Here

        assertEquals("https://graph.facebook.com/v2.1/me?access_token=12345&format=json", respstring);
    }
   
    @Test
    public void unversionedTest() {
        FakeWebRequestor wr = new FakeWebRequestor();
        DefaultFacebookClient client = new DefaultFacebookClient("12345", wr, new DefaultJsonMapper(), Version.UNVERSIONED);
        String respstring = client.fetchObject("/me", String.class);
        assertEquals("https://graph.facebook.com/me?access_token=12345&format=json", respstring);
    }
View Full Code Here

        assertEquals("https://graph.facebook.com/me?access_token=12345&format=json", respstring);
    }
   
    @Test
    public void unversionedNoVersionTest() {
        FakeWebRequestor wr = new FakeWebRequestor();
        DefaultFacebookClient client = new DefaultFacebookClient("12345", wr, new DefaultJsonMapper());
        String respstring = client.fetchObject("/me", String.class);
        assertEquals("https://graph.facebook.com/me?access_token=12345&format=json", respstring);
    }
View Full Code Here

TOP

Related Classes of com.restfb.FakeWebRequestor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.