|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 152 KiB |
@ -0,0 +1,29 @@
|
||||
package 3.dao;
|
||||
|
||||
|
||||
/**
|
||||
* @author fanxiaobao
|
||||
* @version 1.0
|
||||
* @created 23-11月-2025 19:12:38
|
||||
*/
|
||||
public class DbUtil {
|
||||
|
||||
private Connection conn = null;
|
||||
private PerpareStatement ps = null;
|
||||
private ResultSet rs = null;
|
||||
|
||||
public DbUtil(){
|
||||
|
||||
}
|
||||
|
||||
public void finalize() throws Throwable {
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param string
|
||||
*/
|
||||
public ResultSet executeQuery(String string){
|
||||
return null;
|
||||
}
|
||||
}//end DbUtil
|
||||
|
After Width: | Height: | Size: 280 KiB |
@ -0,0 +1,25 @@
|
||||
package 3.ctrl;
|
||||
|
||||
|
||||
/**
|
||||
* @author fanxiaobao
|
||||
* @version 1.0
|
||||
* @created 23-11月-2025 19:12:28
|
||||
*/
|
||||
public class LoginCtrl {
|
||||
|
||||
public LoginCtrl(){
|
||||
|
||||
}
|
||||
|
||||
public void finalize() throws Throwable {
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param String
|
||||
*/
|
||||
public boolean validate(String String){
|
||||
return false;
|
||||
}
|
||||
}//end LoginCtrl
|
||||
|
After Width: | Height: | Size: 262 KiB |
@ -0,0 +1,27 @@
|
||||
package 3.model;
|
||||
|
||||
import 3.dao.DbUtil;
|
||||
|
||||
/**
|
||||
* @author fanxiaobao
|
||||
* @version 1.0
|
||||
* @created 23-11月-2025 19:12:48
|
||||
*/
|
||||
public class LoginDao {
|
||||
|
||||
public LoginDao(){
|
||||
|
||||
}
|
||||
|
||||
public void finalize() throws Throwable {
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param string1
|
||||
* @param string2
|
||||
*/
|
||||
public Customer customerByCid(String string1, String string2){
|
||||
return null;
|
||||
}
|
||||
}//end LoginDao
|
||||
|
After Width: | Height: | Size: 272 KiB |
@ -0,0 +1,29 @@
|
||||
package 3.gui;
|
||||
|
||||
import 3.ctrl.LoginCtrl;
|
||||
import 3.model.LoginDao;
|
||||
|
||||
/**
|
||||
* @author fanxiaobao
|
||||
* @version 1.0
|
||||
* @created 23-11月-2025 19:12:43
|
||||
*/
|
||||
public class LoginGui {
|
||||
|
||||
private JTextField cid;
|
||||
private JTextField cname;
|
||||
private JPasswordField cpin;
|
||||
private DataTime Idatetime;
|
||||
private int Iftimes = 0;
|
||||
private int Istimes = 0;
|
||||
private JButton Submit;
|
||||
|
||||
|
||||
|
||||
public void finalize() throws Throwable {
|
||||
|
||||
}
|
||||
public LoginGui(){
|
||||
|
||||
}
|
||||
}//end LoginGui
|
||||
|
After Width: | Height: | Size: 289 KiB |
|
After Width: | Height: | Size: 331 KiB |
@ -0,0 +1,47 @@
|
||||
package 3.model;
|
||||
|
||||
|
||||
/**
|
||||
* @author fanxiaobao
|
||||
* @version 1.0
|
||||
* @created 23-11月-2025 19:12:48
|
||||
*/
|
||||
public class Customer {
|
||||
|
||||
private String cid;
|
||||
private String cname;
|
||||
private iString cpin;
|
||||
private DateTime Idatetime;
|
||||
private int Iftimes;
|
||||
private int Istimes;
|
||||
|
||||
|
||||
|
||||
public void finalize() throws Throwable {
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param cname
|
||||
* @param cpin
|
||||
* @param cid
|
||||
* @param Idatetime
|
||||
* @param Iftimes
|
||||
* @param Istimes
|
||||
*/
|
||||
public Customer(String cname, String cpin, String cid, Date Idatetime, int Iftimes, int Istimes){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string
|
||||
*/
|
||||
public Customer(String string){
|
||||
|
||||
}
|
||||
|
||||
public void Customer(){
|
||||
|
||||
}
|
||||
}//end Customer
|
||||
|
After Width: | Height: | Size: 311 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,58 @@
|
||||
package 6;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import org.atm.ctrl.Validate;
|
||||
|
||||
public class ValidateTest extends junit.framework.TestCase {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param arg0
|
||||
*/
|
||||
public ValidateTest(String arg0) {
|
||||
super(arg0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @exception Exception
|
||||
*/
|
||||
protected void setUp()
|
||||
throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @exception Exception
|
||||
*/
|
||||
protected void tearDown()
|
||||
throws Exception {
|
||||
super.tearDown();
|
||||
}
|
||||
|
||||
public final void testIsNumeric_01_7() {
|
||||
Assert.assertTrue(Validate.is7RandNumeric("2060041"));
|
||||
}
|
||||
public final void testIsNumeric_02_d() {
|
||||
Assert.assertFalse(Validate.is7RandNumeric("123456d"));
|
||||
}
|
||||
public final void testIsNumeric_03_8() {
|
||||
Assert.assertFalse(Validate.is7RandNumeric("12345678"));
|
||||
}
|
||||
public final void testIsNumeric_04_null() {
|
||||
Assert.assertFalse(Validate.is7RandNumeric(""));
|
||||
}
|
||||
public final void testIsNumeric_05_6() {
|
||||
Assert.assertFalse(Validate.is7RandNumeric("123456"));
|
||||
}
|
||||
}// end ValidateTest
|
||||
@ -0,0 +1,15 @@
|
||||
package 6;
|
||||
|
||||
import org.junit.runners.Suite;
|
||||
import org.junit.runner.RunWith;
|
||||
import junit.framework.TestSuite;
|
||||
import junit.framework.Test;
|
||||
|
||||
@RunWith(Suite.class)@Suite.SuiteClasses({org.atm.ctrl.ValidateTest.class, org.atm.dao.LoginTest.class})
|
||||
public class LoginIntegratedTest {
|
||||
|
||||
public static Test suit() {
|
||||
TestSuite suite = new TestSuite();
|
||||
return suite;
|
||||
}
|
||||
}// end LoginITest
|
||||
@ -0,0 +1,15 @@
|
||||
package 6;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
import org.atm.dao.Login;
|
||||
import org.atm.model.Customer;
|
||||
|
||||
public class LoginTest extends junit.framework.TestCase {
|
||||
public final void testLogin_01() {
|
||||
Assert.assertNotNull(new Login().login(new Customer("2060041", "2060041")));
|
||||
}
|
||||
public final void testLogin_02() {
|
||||
Assert.assertNull(new Login().login(new Customer("1234578", "1234589")));
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 181 KiB |