Skip to content

Instantly share code, notes, and snippets.

@cnevinc
Created September 16, 2015 02:14
Show Gist options
  • Save cnevinc/0a3eca96afaaea0e591a to your computer and use it in GitHub Desktop.
Save cnevinc/0a3eca96afaaea0e591a to your computer and use it in GitHub Desktop.
My first unit test
import com.biideal.biibonus.util.Config;
import junit.framework.TestCase;
import java.util.HashMap;
/**
* Testing my home activity
*/
public class HomeActivityTest extends TestCase {
String url;
public void setUp() throws Exception {
super.setUp();
url = "biibonus://store/?filter=my_rebate&store_id=2&coupon_id=839";
}
public void tearDown() throws Exception {
}
public void testParseDeepLink() throws Exception {
HashMap<String, String> result = Config.parseDeepLink(url);
assertEquals(result.get("feature"), "storex");
assertEquals(result.get("filter"), "my_rebate");
assertEquals(result.get("store_id"), "2");
assertEquals(result.get("coupon_id"), "839");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment