摘要:
一、junit测试用法package com.xs.test;import org.junit.Test;public class DbTest { @Test public void testDbUtil() {system.out.print("OK"); }}用法:将鼠标放在在@Test上,按住Alt+1万能提示符,添加junit包,在按住Alt+1进行导包处理即可。 阅读全文
摘要:
View Code 1 package com.xs.db; 2 3 import java.io.FileInputStream; 4 import java.io.IOException; 5 import java.sql.Connection; 6 import java.sql.DriverManager; 7 import java.sql.PreparedStatement; 8 import java.sql.ResultSet; 9 import java.sql.SQLException; 10 import java.sql.Statement; 1... 阅读全文
摘要:
View Code 1 import junit.framework.TestCase; 2 import org.junit.After; 3 import org.junit.Before; 4 import org.junit.Test; 5 import static org.junit.Assert.*; 6 7 /** 8 * 9 * @author bean10 */11 public class AddOperationTest extends TestCase{12 13 public AddOperationTest() {14 }15 1... 阅读全文