For general information on the JSF CRUD Generator, see JsfCrudGenerator.
| Activity | Description | Expected Result |
|---|---|---|
| start with no entities; create Address1; create Client1 with address Address1 | create 1:1 non-nullable (Addresses and Clients) | Client1 has Address1; Address1 has Client1 |
| create Address2 with client Client1 | attempt to steal during create of owned entity | Client1 has Address2; Address2 has Client1; Address1 has no client |
| edit Address1 to have client Client1 | attempt to steal after create of owned entity | Client1 has Address1; Address1 has Client1; Address2 has no client |
| create Client2 with address Address1 | attempt to steal during create of owner entity | orphan error |
| create Client2 with no address | attempt to violate non-nullable field | can't create Client2: required error |
| create Client2 with address Address2 | prerequisite for next step | Client1 has Address1; Address1 has Client1; Client2 has Address2; Address2 has Client2; |
| edit Client2 to have address Address1 | attempt to steal after create of owner entity | orphan error |
| destroy Address1 | attempt to destroy owned entity | orphan error |
| destroy Client1 | attempt to destroy owner entity | Address1 has no client; Address2 has Client2; Client2 has Address2; Client1 does not exist |
| destroy Client2; destroy Address1, Address2 | destroy remaining entities | no clients or addresses exist |
| Activity | Description | Expected Result |
| start with no entities; create Address1, Address2 | prerequisite for creating clients | Address1 and Address2 exist |
| create Client1 with billingAddress Address1; create Recruiter1 with client Client1 | create 1:1 nullable (Clients and Recruiters) | Recruiter1 has Client1; Client1 has Recruiter1 |
| create Client2 with recruiter Recruiter1 and billingAddress Address2 | attempt to steal during create of owned entity | Recruiter1 has Client2; Client2 has Recruiter1; Client1 has no recruiter |
| edit Client1 to have recruiter Recruiter1 | attempt to steal after create of owned entity | Recruiter1 has Client1; Client1 has Recruiter1; Client2 has no recruiter |
| create Recruiter2 with client Client1 | attempt to steal during create of owner entity | Recruiter2 has Client1; Client1 has Recruiter2; Recruiter1 has no client; Client2 has no recruiter |
| edit Recruiter1 to have client Client1 | attempt to steal after create of owner entity | Recruiter1 has Client1; Client1 has Recruiter1; Recruiter2 has no client; Client2 has no recruiter |
| destroy Recruiter1; edit Recruiter 2 to have client Client1 | attempt to destroy owner entity | Recruiter2 has Client1; Client1 has Recruiter2; Client2 has no recruiter; Recruiter1 does not exist |
| destroy Client1 | attempt to destroy owned entity | Recruiter2 has no client; Client2 has no recruiter; Recruiter1 does not exist; Client1 does not exist |
| destroy Client2; destroy Recruiter2 | destroy remaining entities | no recruiters or clients exist |
| Activity | Description | Expected Result |
| start with no entities; create Address1, Client1, Project1, ConsultantStatus1 | prerequisite for creating consultants and billables | Address1, Client1, Project1, ConsultantStatus1 exist |
| create Consultant1; create Billable1, Billable2, and Billable3 with consultant Consultant1 | create 1:M non-nullable, simple PKs (Consultants and Billables) | Consultant1 has Billable1, Billable2, and Billable3; Billable1, Billable2, and Billable3 have Consultant1 |
| create Consultant2 with billables Billable2 and Billable3 | attempt to steal during create of owned entity | Consultant1 has Billable1; Billable1 has Consultant 1; Consultant2 has Billable2 and Billable3; Billable2 and Billable3 have Consultant2 |
| edit Consultant1 to have billables Billable2 and Billable3 (and only those, i.e., not Billable1. "Only" is used implicitly throughout this document) | attempt to steal multiple and orphan after create of owned entity | orphan error |
| edit Consultant1 to have billables Billable1, Billable2, and Billable3 | attempt to steal multiple after create of owned entity | Consultant1 has Billable1, Billable2, and Billable3; Billable1, Billable2, and Billable3 have Consultant1; Consultant2 has no billables |
| edit Consultant2 to have billable Billable3 | attempt to steal one after create of owned entity | Consultant1 has Billable1 and Billable2; Billable1 and Billable2 have Consultant1; Consultant2 has Billable3; Billable3 has Consultant2 |
| edit Billable1 to have no consultant | attempt to violate non-nullable field | required error |
| edit Billable2 to have consultant Consultant2 | attempt to switch after create of owner entity | Consultant1 has Billable1; Billable1 has Consultant1; Consultant2 has Billable2 and Billable3; Billable2 and Billable3 have Consultant2 |
| create Billable4 with consultant Consultant1 | attempt to create owner entity | Consultant1 has Billable1 and Billable4; Billable1 and Billable4 have Consultant1; Consultant2 has Billable2 and Billable3; Billable2 and Billable3 have Consultant2 |
| destroy Consultant1 | attempt to destroy owned entity, orphaning | orphan error |
| destroy Billable1 | attempt to destroy owner entity | Consultant1 has Billable4; Billable4 has Consultant1; Consultant2 has Billable2 and Billable3; Billable2 and Billable3 have Consultant2; Billable1 does not exist |
| destroy Billable4 | attempt to destroy owner entity (again) | Consultant1 has no billables; Consultant2 has Billable2 and Billable3; Billable2 and Billable3 have Consultant2; Billable1 and Billable4 do not exist |
| destroy Consultant1 | attempt to destroy owned entity | Consultant2 has Billable2 and Billable3; Billable2 and Billable3 have Consultant2; Consultant1 does not exist |
| destroy Billable2, Billable3; destroy Consultant2 | destroy remaining entities | no consultants or billables exist |
| Activity | Description | Expected Result |
| start with no entities; create Address1, Client1, Consultant1 | prerequisite for creating billables and projects | Address1, Client1, Consultant1 exist |
| create Project1; create Billable1, Billable2, and Billable3 with project Project1 | create 1:M non-nullable, 1 composite PK, 1 simple PK (Projects and Billables) | Project1 has Billable1, Billable2, and Billable3; Billable1, Billable2, and Billable3 have Project1 |
| create Project2 with billables Billable2 and Billable3 | attempt to steal during create of owned entity | Project1 has Billable1; Billable1 has Project 1; Project2 has Billable2 and Billable3; Billable2 and Billable3 have Project2 |
| edit Project1 to have billables Billable2 and Billable3 | attempt to steal multiple and orphan after create of owned entity | orphan error (also verify the projectName and client fields are non-editable) |
| edit Project1 to have billables Billable1, Billable2, and Billable3 | attempt to steal multiple after create of owned entity | Project1 has Billable1, Billable2, and Billable3; Billable1, Billable2, and Billable3 have Project1; Project2 has no billables |
| edit Project2 to have billable Billable3 | attempt to steal one after create of owned entity | Project1 has Billable1 and Billable2; Billable1 and Billable2 have Project1; Project2 has Billable3; Billable3 has Project2 |
| edit Billable1 to have no project | attempt to violate non-nullable field | required error |
| edit Billable2 to have project Project2 | attempt to switch after create of owner entity | Project1 has Billable1; Billable1 has Project1; Project2 has Billable2 and Billable3; Billable2 and Billable3 have Project2 |
| create Billable4 with project Project1 | attempt to create owner entity | Project1 has Billable1 and Billable4; Billable1 and Billable4 have Project1; Project2 has Billable2 and Billable3; Billable2 and Billable3 have Project2 |
| destroy Project1 | attempt to destroy owned entity, orphaning | orphan error |
| destroy Billable1 | attempt to destroy owner entity | Project1 has Billable4; Billable4 has Project1; Project2 has Billable2 and Billable3; Billable2 and Billable3 have Project2; Billable1 does not exist |
| destroy Billable4 | attempt to destroy owner entity (again) | Project1 has no billables; Project2 has Billable2 and Billable3; Billable2 and Billable3 have Project2; Billable1 and Billable4 do not exist |
| destroy Project1 | attempt to destroy owned entity | Project2 has Billable2 and Billable3; Billable2 and Billable3 have Project2; Project1 does not exist |
| destroy Billable2, Billable3; destroy Project2 | destroy remaining entities | no projects or billables exist |
| Activity | Description | Expected Result |
| start with no entities; create Address1, Address2 | prerequisite for creating clients | Address1, Address2 exist |
| create Client1 with billingAddress Address1; create Project1, Project2, and Project3 with client Client1 | create 1:M non-nullable, composite PKs (Clients and Projects) | Client1 has Project1, Project2, and Project3; Project1, Project2, and Project3 have Client1 |
| create Client2 with billingAddress Address2 | create owned entity (again) | verify projectCollection is non-editable on create page; Client1 has Project1, Project2, and Project3; Project1, Project2, and Project3 have Client1; Client2 has no projects |
| edit Client1 | verify non-editable fields | verify clientName, clientDepartmentNumber, and projectCollection fields are non-editable |
| edit Project1 | verify non-editable fields | verify projectName and client fields are non-editable |
| create Project4 with no client | attempt to violate a non-nullable field | required error |
| destroy Client1 | attempt to destroy owned entity, orphaning | orphan error |
| destroy Project1, Project2, and Project3 | attempt to destroy owner entities | Client1 and Client2 have no projects; no projects exist |
| destroy Client1 and Client2 | destroy remaining entities | no clients or projects exist |
| Activity | Description | Expected Result |
| start with no entities; create Recruiter1; create ConsultantStatus1; create Consultant1, Consultant2, and Consultant3 with recruiter Recruiter1 | create 1:M nullable, simple PKs (Recruiters and Consultants) | Recruiter1 has Consultant1, Consultant2, and Consultant3; Consultant1, Consultant2, and Consultant3 have Recruiter1 |
| create Recruiter2 with consultants Consultant2 and Consultant3 | attempt to steal multiple during create of owned entity | Recruiter1 has Consultant1; Consultant1 has Recruiter 1; Recruiter2 has Consultant2 and Consultant3; Consultant2 and Consultant3 have Recruiter2 |
| edit Recruiter2 to have consultants Consultant1 and Consultant2 | attempt to steal one, retain one, and orphan one after create of owned entity | Recruiter1 has no consultants; Recruiter2 has Consultant1 and Consultant2; Consultant1 and Consultant2 have Recruiter2; Consultant3 has no recruiter |
| edit Recruiter2 to have no consultants | attempt to orphan all (multiple) | Recruiter1 and Recruiter2 have no consultants; Consultant1, Consultant2, and Consultant3 have no recruiters |
| create Consultant4, Consultant5, Consultant6, and Consultant7; edit Recruiter1 to have Consultant1, Consultant2, and Consultant3; edit Recruiter2 to have Consultant4, Consultant5, Consultant6, and Consultant7 | prepare for next step | note: paging occurs on consultant list page; Recruiter1 has Consultant1, Consultant2, and Consultant3; Consultant1, Consultant2, and Consultant3 have Recruiter1; Recruiter2 has Consultant4, Consultant5, Consultant6, and Consultant7; Consultant4, Consultant5, Consultant6, and Consultant7 have Recruiter2 |
| edit Recruiter2 to have Consultant2, Consultant3, Consultant4, and Consultant5 | attempt to steal multiple, retain multiple, and orphan multiple after create of owned entity | Recruiter1 has Consultant1; Consultant1 has Recruiter1; Recruiter2 has Consultant2, Consultant3, Consultant4, and Consultant5; Consultant2, Consultant3, Consultant4, and Consultant5 have Recruiter2; Consultant6 and Consultant7 have no recruiter |
| destroy Consultant5, Consultant6, and Consultant7 | attempt to destroy owner entities | Consultant5, Consultant6, and Consultant7 no longer exist. Recruiter1 has Consultant1; Consultant1 has Recruiter1; Recruiter2 has Consultant2, Consultant3, and Consultant4; Consultant2, Consultant3, and Consultant4 have Recruiter2 |
| create Consultant5 with recruiter Recruiter1 | attempt to create owner entity | Recruiter 1 has Consultant1 and Consultant5; Consultant1 and Consultant5 have Recruiter 1; Recruiter2 has Consultant2, Consultant3, and Consultant4; Consultant2, Consultant3, and Consultant4 have Recruiter2 |
| edit Consultant5 to have Recruiter2 | attempt to switch after create of owner entity | Recruiter1 has Consultant1; Consultant1 has Recruiter1; Recruiter2 has Consultant2, Consultant3, Consultant4, and Consultant5; Consultant2, Consultant3, Consultant4, and Consultant5 have Recruiter2 |
| edit Consultant5 to have no recruiter | attempt to switch to null after create of owner entity | Recruiter1 has Consultant1; Consultant1 has Recruiter1; Recruiter2 has Consultant2, Consultant3, and Consultant4; Consultant2, Consultant3, and Consultant4 have Recruiter2; Consultant5 has no recruiter |
| destroy Recruiter1 | attempt to destroy owned entity | Consultant1 and Consultant5 have no recruiter; Recruiter1 does not exist; Recruiter2 has Consultant2, Consultant3, and Consultant4; Consultant2, Consultant3, and Consultant4 have Recruiter2 |
| destroy Consultant4 | attempt to destroy owner entity | Consultant1 and Consultant5 have no recruiter; Recruiter1 does not exist; Recruiter2 has Consultant2 and Consultant3; Consultant2 and Consultant3 have Recruiter2; Consultant4 does not exist |
| destroy Recruiter2 | attempt to destroy owned entity | Consultant1, Consultant2, Consultant3, and Consulant5 have no recruiter; No recruiters exist; Consultant4 does not exist |
| destroy remaining consultants | destroy remaining entities | no recruiters or consultants exist |
| Activity | Description | Expected Result |
| start with no entities; create Address1 and Address2; create Client1 with billingAddress Address1; create Client2 with billingAddress Client2; create ConsultantStatus1 | prerequisite for creating projects | verify projectCollection field is non-editable on client create page; ConsultantStatus1, Address1, Address2, Client1, and Client2 exist |
| create Project1 with client Client1; create Consultant1, Consultant2, and Consultant3 with project Project1 | create M:M (Projects and Consultants) | verify all fields are editable on project create page (though not necessarily populated); Project1 has Consultant1, Consultant2, and Consultant3; Consultant1, Consultant2, and Consultant3 have Project1 |
| create Project2 with client Client2 and consultants Consultant2 and Consultant3 | create of owner entity | Project1 has Consultant1, Consultant2, and Consultant3; Project2 has Consultant2 and Consultant3; Consultant1 has Project1; Consultant2 and Consultant3 have Project1 and Project2 |
| edit Project2 to have Consultant1 and Consultant2 | obtain one, retain one, and fire one after create of owner entity | verify projectName and client fields are non-editable on project edit page; Project1 has Consultant1, Consultant2, and Consultant3; Project2 has Consultant1 and Consultant2; Consultant1 and Consultant2 have Project1 and Project2; Consultant3 has Project1 |
| edit Project1 to have no Consultants | fire all after create of owner entity | Project1 has no consultants; Project2 has Consultant1 and Consultant2; Consultant1 and Consultant2 have Project2; Consultant3 has no projects |
| edit Consultant3 to have Project1 and Project2 | obtain multiple after create of owned entity | Project1 has Consultant3; Project2 has Consultant1, Consultant2, and Consultant3; Consultant1 and Consultant2 have Project2; Consultant3 has Project1 and Project2 |
| destroy Project2 | attempt to destroy owner entity with related objects | Project2 no longer exists; Project1 has Consultant3; Consultant3 has Project1; Consultant1 and Consultant2 have no projects; Project2 does not exist |
| destroy Consultant1, Consultant2, and Consultant3 | attempt to destroy owned entities | Project1 has no consultants; Project2 does not exist; no consultants exist |
| destroy Project1 | attempt to destroy empty owner entity | no projects or consultants exist |