Logo: Relish

  1. Sign in

Project: My-project

Update runtime objects

At runtime the client application can execute a set of test against the domain model.
This feature covers the updating of these objects

Scenarios
  • @runtime
Updating TestObject without any revision checking

This job makes a request to update a test object and the object being
updated does not require any revision checking.

Given
a :request_payload_to_update_object is made for version "1" for "Update Runtime Objects"
And
'the test object does not require revision checking'
And
a :test_object_not_revision_checkable exists in the application
And
the test object has a parent :parent_test_object
When
the request is received
Then
the :updated_test_object is returned via the response object
And
the :updated_parent_object is returned via the response object
And
the :updated_test_object has audit entry showing who, what, when of its update
  • @runtime
Updating TestObject which requires revision checking

The TestObject being updated here requires revision checking.
This job that makes a request to update this TestObject passes in a payload
with a revision number that does align with the object in the data store.

Given
a :request_payload_to_update_object is made for version "1" for "Update Runtime Objects"
And
'the test object requires revision checking'
And
'the test object information that is passed in via the payload has a revision number that aligns with that in the datastore'
And
a :test_object_with_an_aligned_revision_number exists in the application
And
the test object has a parent :parent_test_object
When
the request is received
Then
the :updated_revision_checked_test_object is returned via the response object
And
the :updated_parent_object is returned via the response object
And
the :updated_test_object has audit entry showing who, what, when of its update
  • @runtime
Updating TestObject with conflicting revision numbers

The TestObject being updated here requires revision checking.
This job that makes a request to update this TestObject passes in a payload
with a revision number that conflicts with the object in the data store.

Given
a :request_payload_to_update_object is made for version "1" for "Update Runtime Objects"
And
'the test object requires revision checking'
And
'the test object information that is passed in via the payload has a revision number that conflicts with that in the datastore'
And
a :test_object_with_conflicting_revision exists in the application
When
the request is received
Then
a Context::Exception::RevisionMisalignedException is raised with the message "Encountered a revision mismatch for object TestType3. Expected revision 2 but got 3" via the response object
  • @runtime
Updating Batch TestObjects where some objects has conflicting revision checking

Some of the test objects being tested here requires revision checking and some objects' revision
numbers conflict with those in the data store.

Given
a :request_payload_to_update_many_objects is made for version "1" for "Update Runtime Objects"
And
'all test objects require revision checking'
And
'some of the test objects information passed in via the payload has a revision number that conflicts with those in the datastore'
And
a :test_object_with_an_aligned_revision_number exists in the application
And
a :test_object_with_conflicting_revision_number exists in the application
When
the request is received
Then
a Context::Exception::RevisionMisalignedException is raised with the message "Encountered a revision mismatch for object TestType1. Expected revision 3 but got 2" via the response object

Last published over 4 years ago by nbeagley.