use of SQLDatabase.SQLDatabaseConnection in project SmartCity-Market by TechnionYP5777.
the class SQLDatabaseConnectionTest method testCantGetSecurityQusetionOfNotExistedCustomer.
@Test
public void testCantGetSecurityQusetionOfNotExistedCustomer() {
SQLDatabaseConnection sqlConnection = new SQLDatabaseConnection();
try {
sqlConnection.getSecurityQuestionCustomer(customerName);
fail();
} catch (CriticalError e1) {
fail();
} catch (ClientNotExist e2) {
}
}
use of SQLDatabase.SQLDatabaseConnection in project SmartCity-Market by TechnionYP5777.
the class SQLDatabaseConnectionTest method testRemoveNotExistedPakageFromWarehouse.
@Test
public void testRemoveNotExistedPakageFromWarehouse() {
SQLDatabaseConnection sqlConnection = new SQLDatabaseConnection();
ProductPackage productPackage = new ProductPackage(new SmartCode(barcodeDebug, date112000), 10, locationWarehouse);
try {
sqlConnection.removeProductPackageFromWarehouse(null, productPackage);
fail();
} catch (ProductPackageNotExist e) {
} catch (CriticalError | ClientNotConnected | ProductNotExistInCatalog | ProductPackageAmountNotMatch e) {
fail();
}
}
Aggregations