@Test public void testResetArea() throws Exception { areaPicker.setArea(Area.fromRaiNganSqaureWa(2, 0, 30)); areaPicker.setArea(Area.fromSquareMeter(0)); assertEquals("", areaPicker.getText()); }
@Test public void testShowOnlyRai() throws Exception { areaPicker.setArea(Area.fromRaiNganSqaureWa(2, 0, 0)); assertEquals("2 ไร่", areaPicker.getText()); }
@Test public void testShowAreaRaiNganSquareWa() throws Exception { areaPicker.setArea(Area.fromRaiNganSqaureWa(3, 3, 40)); assertEquals("3 ไร่ 3 งาน 40 ตารางวา", areaPicker.getText()); }