package org.tearsofaunicorn.auspost.domestic.postcode.search.model;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * _TODO:_ Write summary
 */
public class SearchRequestTest {

    @Test
    public void testQuery() throws Exception {
        Assert.fail("Implement test");

    }

    @Test
    public void testSetState() throws Exception {
        Assert.fail("Implement test");

    }

    @Test
    public void testExcludePostBoxes() throws Exception {
        Assert.fail("Implement test");

    }

    @Test
    public void testBuildUrl() throws Exception {
        Assert.fail("Implement test");

    }
}
@@ -83,29 +83,23 @@
 nit.
-Tes
+Asser
 t;%0A
-%0A
 import 
-static 
 org.
@@ -108,51 +108,14 @@
 nit.
-Assert.*;%0A%0A/**%0A * _TODO:_ Write summary%0A */
+Test;%0A
 %0Apub
@@ -214,40 +214,155 @@
     
-Assert.fail(%22Implement test%22
+String request = new SearchRequest(%22apiKey%22, %22http://test.com%22).query(%22query%22).buildUrl();%0A        Assert.assertTrue(request.contains(%22q=query%22)
 );%0A
-%0A
     
@@ -436,40 +436,170 @@
     
-Assert.fail(%22Implement test%22
+String request = new SearchRequest(%22apiKey%22, %22http://test.com%22).setState(AustralianState.WA).buildUrl();%0A        Assert.assertTrue(request.contains(%22state=WA%22)
 );%0A
-%0A
     
@@ -681,150 +681,183 @@
     
-Assert.fail(%22Implement test%22);%0A%0A    %7D%0A%0A    @Test%0A    public void testBuildUrl() throws Exception %7B%0A        Assert.fail(%22Implement test%22);%0A
+String request = new SearchRequest(%22apiKey%22, %22http://test.com%22).excludePostBoxes(true).buildUrl();%0A        Assert.assertTrue(request.contains(%22excludePostBoxFlag=true%22));
 %0A    %7D%0A
+%0A
 %7D

Add test for building search requests