package tw.kewang.hbase;

import junit.framework.TestCase;
import tw.kewang.hbase.dao.HBaseSettings;

public class DaoTest extends TestCase {
	public void testUser1NoFields() {
		HBaseSettings.setZooKeeperQuorum("localhost");

		UserDao uDao = new UserDao();

		User1 u1 = (User1) uDao.getByRowkey("xyz_abc");

		assertEquals("xyz", u1.getUserId());
		assertEquals("abc", u1.getAccessToken());
	}
}
@@ -161,16 +161,19 @@
 ser1
-NoFields
+GetByRowkey
 () %7B
@@ -346,16 +346,16 @@
 rId());%0A
-
 %09%09assert
@@ -392,10 +392,493 @@
 n());%0A%09%7D
+%0A%0A%09public void testUser1GetByRowkeyNotFound() %7B%0A%09%09HBaseSettings.setZooKeeperQuorum(%22localhost%22);%0A%0A%09%09UserDao uDao = new UserDao();%0A%0A%09%09User1 u1 = (User1) uDao.getByRowkey(%22xyz_a%22);%0A%0A%09%09assertNull(u1);%0A%09%7D%0A%0A%09public void testUser1AndUser2GetByRowkey() %7B%0A%09%09HBaseSettings.setZooKeeperQuorum(%22localhost%22);%0A%0A%09%09UserDao uDao = new UserDao();%0A%0A%09%09User1 u1 = (User1) uDao.getByRowkey(%22xyz_abc%22);%0A%09%09User2 u2 = (User2) uDao.getByRowkey(%22xyz_abc_kewang%22);%0A%0A%09%09assertNotNull(u1);%0A%09%09assertNotNull(u2);%0A%09%7D
 %0A%7D

Add more tests