package com.swistak.webapi;

import static org.junit.Assert.*;

import org.junit.Test;

import com.swistak.webapi.SearchCommand;

public class SearchCommandTest {

	@Test
	public void nokia() {
		SearchCommand search = SearchCommand.fraza("nokia");
		search.run();
		assertTrue(search.total_found.value.intValue() > 0);
	}

	@Test
	public void nie_ma_i_nie_bedzie() {
		SearchCommand search = SearchCommand.fraza("nie ma i nie będzie");
		search.run();
		assertNull(search.total_found.value);
		assertNull(search.search_auctions.value);
		assertEquals(0, search._return.value.length);
		assertEquals(0, search.err.value.length);
	}
}

@@ -341,27 +341,21 @@
 oid 
-nie_ma_i_nie_bedzie
+random_string
 () %7B
@@ -405,27 +405,18 @@
 za(%22
-nie ma i nie b%C4%99dzie
+qwertyuiop
 %22);%0A

update test for no result