package com.afrozaar.wordpress.wpapi.v2;

import com.afrozaar.wordpress.wpapi.v2.model.Post;
import com.afrozaar.wordpress.wpapi.v2.util.ClientFactory;

import org.assertj.core.api.Assertions;
import org.junit.Test;

import java.util.Properties;

public class ClientTest {

    @Test
    public void foo() {
        Assertions.assertThat("x").isEqualTo("x");
    }

    @Test
    public void posts() {
        Properties properties = new Properties();
        properties.put("baseUrl", "http://localhost/");

        Client client = ClientFactory.fromProperties(properties);

        final PagedResponse<Post> postPagedResponse = client.fetchPosts();

        // TODO


    }
}
@@ -213,64 +213,182 @@
 st;%0A
-%0Aimport java.util.Properties;%0A%0Apublic class ClientTest %7B
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.util.Properties;%0A%0Apublic class ClientTest %7B%0A%0A    Logger LOG = LoggerFactory.getLogger(ClientTest.class);
 %0A%0A  
@@ -509,24 +509,26 @@
 d posts() %7B%0A
+%0A%0A
         Prop
@@ -620,16 +620,162 @@
 host/%22);
+%0A        properties.put(%22username%22, %22username%22);%0A        properties.put(%22password%22, %22password%22);%0A%0A        LOG.debug(%22properties: %7B%7D%22, properties);
 %0A%0A      
@@ -907,24 +907,93 @@
 chPosts();%0A%0A
+        final long count = postPagedResponse.list.stream().count();%0A%0A
         // T
@@ -995,17 +995,17 @@
  // TODO
-%0A
+:
 %0A%0A    %7D%0A

Make call to wordpress installation (TODO: mock)