openlmis-contract-tests

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
OLMIS-7345: Updated CHANGELOG.md
OLMIS-7345: Updated CHANGELOG.md
OLMIS-7219: Updated POST /order and /orders/batch to return existing orders if already created
OLMIS-7219: Updated POST /order and /orders/batch to return existing orders if already created
NullPointer is thrown in that case.

NullPointer is thrown in that case.

Let's not change behavior for this endpoint

Let's not change behavior for this endpoint

there's no "requisition" concept in fulfillment - let's stick to external id

there's no "requisition" concept in fulfillment - let's stick to external id

9.0.0 - major version needs to be updated in case of breaking changes

9.0.0 - major version needs to be updated in case of breaking changes

Actually, let's not change this behavior for POST /orders - it should still return 400 if the order already exists

Actually, let's not change this behavior for POST /orders - it should still return 400 if the order already exists

Do we need this check? What happens if I try to find by null value?

Do we need this check? What happens if I try to find by null value?

Looks good to me! I only noticed one typo - left a comment

Looks good to me! I only noticed one typo - left a comment

extensions

extensions

As in MessageKeys - we should never copy other classes/resources from the main module in the extension. If those ever change in the stockmanagement - we break/hide it here.

As in MessageKeys - we should never copy other classes/resources from the main module in the extension. If those ever change in the stockmanagement - we break/hide it here.

The extension module should have access to the classes from the module it extends - we shouldn't be required to copy the classes we need

The extension module should have access to the classes from the module it extends - we shouldn't be required to copy the classes we need

General thought - looking at those tests, at the validators, and at this examplar in general, it's very difficult to find what's the difference between the original version and the extended version...

General thought - looking at those tests, at the validators, and at this examplar in general, it's very difficult to find what's the difference between the original version and the extended version. We should go ahead and completely change those 3 validators and their names.

Some ideas:
NoneValidator - an extension that demonstrates how to switch off one validator completely (it always passes)
OnlyLoggingValidator - an extension to a validator that only prints warning but doesn't fail validation - perhaps difficult to test
NoKitsValidator - a validator that prevents the use of kits - it always fails when kits are used

In general - avoid subtle changes, but demonstrate that you can completely alter the validator

I was considering having only the messages which are used in the extension module. But eventually I thought that if there will be any other/more messages used then they would need to be added here ...

I was considering having only the messages which are used in the extension module. But eventually I thought that if there will be any other/more messages used then they would need to be added here each time.

I was considering having only the messages which are used in the extension module. But eventually I thought that if there will be any other/more messages used then they would need to be added here ...

I was considering having only the messages which are used in the extension module. But eventually I thought that if there will be any other/more messages used then they would need to be added here each time.

Why do we need this whole file?

Why do we need this whole file?

Why do we need this whole file?

Why do we need this whole file?

Thank you!

Thank you!

I just took this pattern from Stock Management contract tests.

I just took this pattern from Stock Management contract tests.

Good job https://review.openlmis.org/static/ql0uca/2static/images/wiki/icons/emoticons/smile.gif

Good job

Is there any reason why we decided to present the request as JSON instead of transforming it into a table?

Is there any reason why we decided to present the request as JSON instead of transforming it into a table?

OLMIS-6957: Added Contract test for Stock Management extension validators
OLMIS-6957: Added Contract test for Stock Management extension validators