正在加载图片...
●●● ●●●●● ●●●● ●●●● 一个完整的测试用例 ●●●● ●●0● public class stringiest extends Testcase t protected void setup()( / run before ★/} protected void tearDown ()(/ after */1 public void testsimpleEqual ( string sl new string(abcd)i String s2 new string ("abcd")i assertfrue(Strings not equal s1 equals(s2))i public static void main(string[] args)t junit. textui. TestRunner run (suite ())i一个完整的测试用例 public class StringTest extends TestCase { protected void setUp(){ /* run before */} protected void tearDown(){ /* after */ } public void testSimpleEqual() { String s1 = new String(“abcd”); String s2 = new String(“abcd”); assertTrue(“Strings not equal”, s1.equals(s2)); } public static void main(String[] args){ junit.textui.TestRunner.run (suite ()); } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有