From ad15ae4cbb05b5040e2738c95b9bc304fc2c80df Mon Sep 17 00:00:00 2001 From: salehshoji Date: Sat, 27 Jun 2020 00:15:52 +0430 Subject: [PATCH] make file name true --- src/test/java/registerTest.java | 49 --------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 src/test/java/registerTest.java diff --git a/src/test/java/registerTest.java b/src/test/java/registerTest.java deleted file mode 100644 index db1836c..0000000 --- a/src/test/java/registerTest.java +++ /dev/null @@ -1,49 +0,0 @@ -import Control.Controller; -import Model.*; -import Model.Manager; -import javafx.scene.control.Control; -import org.junit.Assert; -import org.junit.Test; -import static org.junit.Assert.*; -import org.example.*; -import org.junit.jupiter.api.DynamicTest; - -import java.sql.Connection; -import java.util.Random; - -class RegisterTest { - - private String username; - private String password; - - @Test - public void testCustomerRegister() { - username = "testestestestest"; - password = "reza"; - //not exist before - Assert.assertNull(Account.getAccountWithName(username)); - Controller.getOurController().controllerNewAccount("customer", username, password); - //createAccount - Assert.assertNull(Account.getAccountWithName(username + "a")); - // true username - Assert.assertEquals(username, Account.getAccountWithName(username).getUserName()); - //true password - Assert.assertEquals("reza", Account.getAccountWithName(username).getPassWord()); - - } - - @Test - public void testSellerRegister(){ - username = "sellertwo"; - password = "12321"; - //not existBefore - Assert.assertNull(Account.getAccountWithName(username)); - //create Account - Assert.assertNull(Account.getAccountWithName(username)); - //Accept By Manager - Controller.getOurController().controllerNewAccount("seller", username, password); - Request request = Manager.getRequestByName(username); - Controller.getOurController().acceptRequest(request); - Assert.assertNotNull(Account.getAccountWithName(username)); - } -}