brunocvcunha/instagram4j

View on GitHub
src/examples/java/accounts/QeSyncTest.java

Summary

Maintainability
A
0 mins
Test Coverage
package accounts;

import org.junit.Assert;
import org.junit.Test;

import com.github.instagram4j.instagram4j.IGClient;
import com.github.instagram4j.instagram4j.requests.qe.QeSyncRequest;
import com.github.instagram4j.instagram4j.responses.IGResponse;

import lombok.extern.slf4j.Slf4j;
import serialize.SerializeTestUtil;

@Slf4j
public class QeSyncTest {
    @Test
    // Run SerializeTestUtil.serializeLogin first to generate saved sessions
    public void testName() throws Exception {
        IGClient client = SerializeTestUtil.getClientFromSerialize("igclient.ser", "cookie.ser");
        IGResponse response = new QeSyncRequest().execute(client).join();
        Assert.assertEquals("ok", response.getStatus());
        response.getExtraProperties().keySet().forEach(log::debug);
        log.debug("Success");
    }
}