Android系统单元测试方法(19)
发表于:2011-06-30来源:未知作者:领测软件测试网采编点击数:
标签:
class ); } public TestMainActivity(Stringpkg,ClassMainActivityactivityClass){ super (pkg,activityClass); } @MediumTest public void testSum(){ assertEquals( 3 ,getActivity().sum( 1 , 2 )); } @MediumTes
class);
}
public TestMainActivity(String pkg, Class<MainActivity> activityClass) {
super(pkg, activityClass);
}
@MediumTest
public void testSum() {
assertEquals(3, getActivity().sum(1, 2));
}
@MediumTest
public void testSubstract() {
assertEquals(-1, getActivity().substract(1, 2));
}
}