The Customer DAO

##### Project Documentation

- Project Information
- Project Reports
  - Surefire Report
  - Javadoc
  - SpotBugs
  - JaCoCo
  - Checkstyle
  - CPD
  - PMD
  - Source Xref
  - Test Source Xref
  - Dependency Check
  - DSM Report
  - Tag List

## Surefire Report

## Summary

[Summary] [Package List] [Test Cases]

Tests | Errors | Failures | Skipped | Success Rate | Time
--- | --- | --- | --- | --- | ---
321 | 0 | 0 | 0 | 100% | 31.038

Note: failures are anticipated and checked for with assertions while errors are unanticipated.

## Package List

[Summary] [Package List] [Test Cases]

Package | Tests | Errors | Failures | Skipped | Success Rate | Time
--- | --- | --- | --- | --- | --- | ---
org.example.customerdao | 317 | 0 | 0 | 0 | 100% | 30.324
org.example.customerdao.utility | 4 | 0 | 0 | 0 | 100% | 0.714

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

### org.example.customerdao

| Class | Tests | Errors | Failures | Skipped | Success Rate | Time
--- | --- | --- | --- | --- | --- | --- | ---
| OrderDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 0.654
| SupplierDAOFastTests | 34 | 0 | 0 | 0 | 100% | 6.525
| CustomerDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 0.592
| ProductDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 0.527
| CustomerDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 0.688
| SupplierDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 0.831
| ProductDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 0.625
| OrderDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 0.659
| CustomerDAOFastTests | 2 | 0 | 0 | 0 | 100% | 0.733
| CustomerDAOSlowTests | 1 | 0 | 0 | 0 | 100% | 0.581
| SupplierDAOFastTests | 2 | 0 | 0 | 0 | 100% | 0.208
| SupplierDAOSlowTests | 1 | 0 | 0 | 0 | 100% | 0.403
| ProductDAOFastTests | 3 | 0 | 0 | 0 | 100% | 0.206
| ProductDAOSlowTests | 1 | 0 | 0 | 0 | 100% | 0.276
| OrderDAOFastTests | 2 | 0 | 0 | 0 | 100% | 4.904
| OrderDAOSlowTests | 1 | 0 | 0 | 0 | 100% | 0.347
| OrderDAOFastTests | 36 | 0 | 0 | 0 | 100% | 2.641
| SupplierDAOSlowTests | 3 | 0 | 0 | 0 | 100% | 2.903
| CustomerDAOFastTests | 33 | 0 | 0 | 0 | 100% | 1.523
| CustomerDAOFastTests | 33 | 0 | 0 | 0 | 100% | 0.33
| SupplierDAOFastTests | 34 | 0 | 0 | 0 | 100% | 0.166
| ProductDAOFastTests | 37 | 0 | 0 | 0 | 100% | 0.142
| OrderDAOFastTests | 36 | 0 | 0 | 0 | 100% | 2.877
| ProductDAOFastTests | 37 | 0 | 0 | 0 | 100% | 0.983

### org.example.customerdao.utility

| Class | Tests | Errors | Failures | Skipped | Success Rate | Time
--- | --- | --- | --- | --- | --- | --- | ---
| TestNonDeleteableRecordException | 4 | 0 | 0 | 0 | 100% | 0.714

## Test Cases

[Summary] [Package List] [Test Cases]

### OrderDAOSlowTests

| testDeleteOrder | 0.206
| testUpdateOrder | 0.253
| testAddOrder | 0.195

### SupplierDAOFastTests

| testNullIsDeleteableId | 1.905
| testIsNotDeleteableSupplier | 0.379
| testInvalidEntityIsDeleteableCustomer | 0.008
| testNullUpdateSupplier | 0.008
| testNullCredentialsAddSupplier | 0.044
| testNullCredentialsIsDeleteableId | 0.004
| testNullSupplierUpdateSupplier | 0.004
| testFindSupplierByValidId | 0.106
| testFindNoSuppliersByName | 0.033
| testNullCredentialsUpdateSupplier | 0.052
| testUnauthorizedDeleteSupplier | 0.06
| testNullCredentialsIsDeleteableSupplier | 0.025
| testNullIsDeleteableSupplier | 0.005
| testUnauthorizedFindSuppliersByName | 0.006
| testNullDeleteSupplier | 0.01
| testFindAllSuppliers | 0.696
| testNullCredentialsFindAllSuppliers | 0.001
| testNullCredentialsDeleteSupplier | 0.016
| testFindSuppliersByName | 0.037
| testFindSupplierByInvalidId | 0.007
| testInvalidEntityDeleteableProduct | 0.003
| testUnauthorizedFindAllSuppliers | 0.005
| testUnauthorizedAddSupplier | 0.009
| testNullCredentialsFindSupplierById | 0.001
| testIsNotDeleteableId | 0.002
| testIsDeleteableSupplier | 0.01
| testNullCredentialsFindSuppliersByName | 0.001
| testNotDeleteableSupplier | 0.015
| testUnauthorizedFindSupplierById | 0.004
| testUnauthorizedIsDeleteableId | 0
| testUnauthorizedUpdateSupplier | 0.012
| testNullAddSupplier | 0
| testIsDeleteableId | 0.004
| testUnauthorizedIsDeleteableSupplier | 0.005

### CustomerDAOSlowTests

| testAddCustomer | 0.175
| testUpdateCustomer | 0.219
| testDeleteCustomer | 0.198

### ProductDAOSlowTests

| testUpdateProduct | 0.202
| testAddProduct | 0.158
| testDeleteProduct | 0.166

### TestNonDeleteableRecordException

| testThrowableConstructor | 0.707
| testStringThrowableConstructor | 0
| testStringConstructor | 0
| testDefaultConstructor | 0

### CustomerDAOSlowTests

| testAddCustomer | 0.218
| testUpdateCustomer | 0.212
| testDeleteCustomer | 0.258

### SupplierDAOSlowTests

| testUpdateSupplier | 0.337
| testDeleteSupplier | 0.285
| testAddSupplier | 0.209

### ProductDAOSlowTests

| testUpdateProduct | 0.206
| testAddProduct | 0.239
| testDeleteProduct | 0.18

### OrderDAOSlowTests

| testDeleteOrder | 0.238
| testUpdateOrder | 0.223
| testAddOrder | 0.198

### CustomerDAOFastTests

| testFindCustomerById | 0.016
| testFindAllCustomers | 0.717

### CustomerDAOSlowTests

| testAddCustomer | 0.581

### SupplierDAOFastTests

| testFindSupplierByValidId | 0.012
| testFindAllSuppliers | 0.196

### SupplierDAOSlowTests

| testAddSupplier | 0.403

### ProductDAOFastTests

| testFindAllActiveProducts | 0.084
| testFindAllProducts | 0.117
| testFindProductByValidId | 0.005

### ProductDAOSlowTests

| testAddProduct | 0.276

### OrderDAOFastTests

| testFindAllOrders | 4.884
| testFindOrderById | 0.02

### OrderDAOSlowTests

| testAddOrder | 0.347

### OrderDAOFastTests

| testInvalidFindOrdersByCustomer | 0.005
| testUnauthorizedDeleteOrder | 0.003
| testInvalidFindOrderById | 0.001
| testNullOrderDeleteOrder | 0.001
| testUnauthorizedUpdateOrder | 0.002
| testNullCredentialsIsDeleteable | 0.003
| testNullOrderIsDeleteable | 0
| testNullOrderAddOrder | 0
| testFindOrdersByCustomer | 0.022
| testNullOrderUpdateOrder | 0.001
| testWrongEntityIsDeleteable | 0.003
| testUnauthorizedFindAllOrderItemss | 0.004
| testNullCredentialsDeleteOrder | 0
| testNullCredentialsFindAllOrders | 0
| testUnauthorizedFindAllOrders | 0
| testUnauthorizedIsDeleteable | 0.005
| testNullCredentialsFindOrderById | 0
| testUnauthorizedFindOrdersByCustomer | 0
| testUnauthorizedFindOrderById | 0
| testNullCredentialsUpdateOrder | 0
| testNullCredentialsDeleteOrderById | 0
| testIsDeleteable | 0.005
| testUnauthorizedDeleteOrderById | 0
| testNullCredentialsFindOrderByCustomer | 0
| testUnauthorizedAddOrder | 0
| testFindAllOrderItems | 0.003
| testNullCredentialsAddOrder | 0
| testIsDeleteableById | 0
| testNullCredentialsIsDeleteableById | 0
| testNullOrderFindAllOrderItems | 0
| testInvalidOrderUpdateOrder | 0.004
| testNullCredentialsFindAllOrderItems | 0.003
| testUnauthorizedIsDeleteableById | 0
| testNullFindOrdersByCustomer | 0
| testFindAllOrders | 2.393
| testFindOrderById | 0

### SupplierDAOSlowTests

| testUpdateSupplier | 1.63
| testDeleteSupplier | 0.604
| testAddSupplier | 0.668

### CustomerDAOFastTests

| testNullIsDeleteableId | 0.007
| testFindNoCustomersByName | 0.006
| testNullCredentialsDeleteCustomer | 0.005
| testInvalidEntityIsDeleteableCustomer | 0.004
| testNullCredentialsIsDeleteableId | 0
| testUnauthorizedAddCustomer | 0.013
| testUnauthorizedFindCustomersByName | 0
| testIsDeleteableCustomer | 0.031
| testNotDeleteableCustomer | 0.018
| testFindCustomersByName | 0.019
| testInvalidEntityDeleteableCustomer | 0.005
| testUnauthorizedUpdateCustomer | 0.007
| testFindCustomerById | 0.037
| testNullCredentialsFindCustomerById | 0
| testNullAddCustomer | 0
| testUnauthorizedIsDeleteableCustomer | 0.011
| testUnauthorizedFindCustomerById | 0
| testIsNotDeleteableCustomer | 0.012
| testNullUpdateCustomer | 0
| testNullCredentialsFindCustomersByName | 0
| testNullCredentialsAddCustomer | 0.005
| testNullCredentialsUpdateCustomer | 0.003
| testFindCustomerByInvalidId | 0.008
| testIsNotDeleteableId | 0
| testUnauthorizedDeleteCustomer | 0.011
| testNullCredentialsIsDeleteableCustomer | 0.008
| testUnauthorizedIsDeleteableId | 0
| testFindAllCustomers | 0.637
| testNullCredentialsFindAllCustomers | 0.003
| testNullIsDeleteableCustomer | 0
| testNullDeleteCustomer | 0.006
| testIsDeleteableId | 0.001
| testUnauthorizedFindAllCustomers | 0.003

### CustomerDAOFastTests

| testNullIsDeleteableId | 0.003
| testFindNoCustomersByName | 0.002
| testNullCredentialsDeleteCustomer | 0.002
| testInvalidEntityIsDeleteableCustomer | 0.001
| testNullCredentialsIsDeleteableId | 0.001
| testUnauthorizedAddCustomer | 0.003
| testUnauthorizedFindCustomersByName | 0.001
| testIsDeleteableCustomer | 0.01
| testNotDeleteableCustomer | 0
| testFindCustomersByName | 0.004
| testInvalidEntityDeleteableCustomer | 0
| testUnauthorizedUpdateCustomer | 0.002
| testFindCustomerById | 0.009
| testNullCredentialsFindCustomerById | 0
| testNullAddCustomer | 0
| testUnauthorizedIsDeleteableCustomer | 0.005
| testUnauthorizedFindCustomerById | 0
| testIsNotDeleteableCustomer | 0.007
| testNullUpdateCustomer | 0
| testNullCredentialsFindCustomersByName | 0
| testNullCredentialsAddCustomer | 0
| testNullCredentialsUpdateCustomer | 0.006
| testFindCustomerByInvalidId | 0
| testIsNotDeleteableId | 0
| testUnauthorizedDeleteCustomer | 0.006
| testNullCredentialsIsDeleteableCustomer | 0.002
| testUnauthorizedIsDeleteableId | 0.005
| testFindAllCustomers | 0.253
| testNullCredentialsFindAllCustomers | 0.002
| testNullIsDeleteableCustomer | 0.002
| testNullDeleteCustomer | 0.002
| testIsDeleteableId | 0.002
| testUnauthorizedFindAllCustomers | 0

### SupplierDAOFastTests

| testNullIsDeleteableId | 0.001
| testInvalidEntityIsDeleteableCustomer | 0.003
| testNullCredentialsIsDeleteableId | 0
| testIsNotDeleteableId | 0
| testUnauthorizedIsDeleteableId | 0
| testIsDeleteableId | 0
| testIsNotDeleteableSupplier | 0.007
| testNullUpdateSupplier | 0
| testNullCredentialsAddSupplier | 0
| testNullSupplierUpdateSupplier | 0
| testFindSupplierByValidId | 0.007
| testFindNoSuppliersByName | 0.004
| testNullCredentialsUpdateSupplier | 0.002
| testUnauthorizedDeleteSupplier | 0.003
| testNullCredentialsIsDeleteableSupplier | 0.004
| testNullIsDeleteableSupplier | 0
| testUnauthorizedFindSuppliersByName | 0
| testNullDeleteSupplier | 0.001
| testFindAllSuppliers | 0.084
| testNullCredentialsFindAllSuppliers | 0
| testNullCredentialsDeleteSupplier | 0.004
| testFindSuppliersByName | 0.014
| testFindSupplierByInvalidId | 0.004
| testInvalidEntityDeleteableProduct | 0
| testUnauthorizedFindAllSuppliers | 0
| testUnauthorizedAddSupplier | 0.006
| testNullCredentialsFindSupplierById | 0
| testIsDeleteableSupplier | 0.006
| testNullCredentialsFindSuppliersByName | 0
| testNotDeleteableSupplier | 0.007
| testUnauthorizedFindSupplierById | 0
| testUnauthorizedUpdateSupplier | 0.006
| testNullAddSupplier | 0
| testUnauthorizedIsDeleteableSupplier | 0.003

### ProductDAOFastTests

| testNullIsDeleteableId | 0.001
| testInvalidEntityIsDeleteableCustomer | 0.002
| testNullCredentialsIsDeleteableId | 0
| testIsNotDeleteableId | 0.003
| testUnauthorizedIsDeleteableId | 0
| testIsDeleteableId | 0
| testInvalidEntityDeleteableProduct | 0
| testIsDeleteableProduct | 0.007
| testNullCredentialsUpdateProduct | 0.002
| testUnauthorizedUpdateProduct | 0
| testNullCredentialsAddProduct | 0
| testUnauthorizedAddProduct | 0.001
| testFindProductByInvalidId | 0.003
| testNullAddProduct | 0.001
| testNullIsDeleteableProduct | 0.001
| testNullCredentialsFindProductsBySupplier | 0.004
| testUnauthorizedFindAllActiveProducts | 0
| testNotDeleteableProduct | 0.001
| testFindAllActiveProducts | 0.034
| testNullCredentialsIsDeleteableProduct | 0
| testNullProductUpdateProduct | 0.002
| testNullCredentialsDeleteProduct | 0
| testUnauthorizedDeleteProduct | 0.002
| testIsNotDeleteableProduct | 0.002
| testUnauthorizedFindProductsBySupplier | 0.003
| testNullCredentialsFindProductById | 0
| testFindNoProductsBySupplier | 0.005
| testFindAllProducts | 0.053
| testUnauthorizedFindProductById | 0
| testNullCredentialsFindAllActiveProducts | 0.003
| testNullCredentialsFindAllProducts | 0
| testNullUpdateProduct | 0
| testUnauthorizedFindAllProducts | 0
| testFindProductsBySupplier | 0.007
| testFindProductByValidId | 0.001
| testUnauthorizedIsDeleteableProduct | 0.004
| testNullDeleteProduct | 0

### OrderDAOFastTests

| testInvalidFindOrdersByCustomer | 0.006
| testUnauthorizedDeleteOrder | 0.009
| testInvalidFindOrderById | 0
| testNullOrderDeleteOrder | 0
| testUnauthorizedUpdateOrder | 0.001
| testNullCredentialsIsDeleteable | 0.002
| testNullOrderIsDeleteable | 0.002
| testNullOrderAddOrder | 0
| testFindOrdersByCustomer | 0.029
| testNullOrderUpdateOrder | 0
| testWrongEntityIsDeleteable | 0
| testUnauthorizedFindAllOrderItemss | 0.003
| testNullCredentialsDeleteOrder | 0.001
| testNullCredentialsFindAllOrders | 0
| testUnauthorizedFindAllOrders | 0.001
| testUnauthorizedIsDeleteable | 0.007
| testNullCredentialsFindOrderById | 0
| testUnauthorizedFindOrdersByCustomer | 0.001
| testUnauthorizedFindOrderById | 0.001
| testNullCredentialsUpdateOrder | 0.001
| testNullCredentialsDeleteOrderById | 0
| testIsDeleteable | 0.005
| testUnauthorizedDeleteOrderById | 0.001
| testNullCredentialsFindOrderByCustomer | 0.005
| testUnauthorizedAddOrder | 0.004
| testFindAllOrderItems | 0.005
| testNullCredentialsAddOrder | 0.002
| testIsDeleteableById | 0
| testNullCredentialsIsDeleteableById | 0.001
| testNullOrderFindAllOrderItems | 0
| testInvalidOrderUpdateOrder | 0.002
| testNullCredentialsFindAllOrderItems | 0.002
| testUnauthorizedIsDeleteableById | 0
| testNullFindOrdersByCustomer | 0.001
| testFindAllOrders | 2.78
| testFindOrderById | 0.005

### ProductDAOFastTests

| testNullIsDeleteableId | 0.005
| testInvalidEntityIsDeleteableCustomer | 0.003
| testIsDeleteableProduct | 0.013
| testNullCredentialsIsDeleteableId | 0.001
| testNullCredentialsUpdateProduct | 0.003
| testUnauthorizedUpdateProduct | 0.002
| testNullCredentialsAddProduct | 0.004
| testUnauthorizedAddProduct | 0.001
| testFindProductByInvalidId | 0.003
| testNullAddProduct | 0.007
| testNullIsDeleteableProduct | 0.002
| testNullCredentialsFindProductsBySupplier | 0.01
| testUnauthorizedFindAllActiveProducts | 0.003
| testNotDeleteableProduct | 0.014
| testFindAllActiveProducts | 0.186
| testNullCredentialsIsDeleteableProduct | 0
| testNullProductUpdateProduct | 0.01
| testNullCredentialsDeleteProduct | 0.002
| testUnauthorizedDeleteProduct | 0.009
| testIsNotDeleteableProduct | 0.013
| testUnauthorizedFindProductsBySupplier | 0.003
| testNullCredentialsFindProductById | 0
| testInvalidEntityDeleteableProduct | 0
| testFindNoProductsBySupplier | 0.025
| testFindAllProducts | 0.168
| testUnauthorizedFindProductById | 0.005
| testNullCredentialsFindAllActiveProducts | 0
| testNullCredentialsFindAllProducts | 0
| testNullUpdateProduct | 0
| testIsNotDeleteableId | 0.007
| testUnauthorizedFindAllProducts | 0
| testUnauthorizedIsDeleteableId | 0
| testFindProductsBySupplier | 0.013
| testFindProductByValidId | 0.009
| testUnauthorizedIsDeleteableProduct | 0.002
| testIsDeleteableId | 0.001
| testNullDeleteProduct | 0