OpenMRS Core Master

Build: #1555 was successful Run by child build TRUNK-STAND

Stages & jobs

  1. Build and Test

  2. Deploy

  3. Release

    Requires a user to start manually

Code commits

openmrs-core

  • Ivo Ulrich <teleivo@users.noreply.github.com>

    Ivo Ulrich <teleivo@users.noreply.github.com> a0cd91742cf61738a7d48fda1ac8fdd111469614

    Merge pull request #2104 from teleivo/codetemplates
    Remove throws Exception from IDE code templates

  • teleivo <mrteleivo@gmail.com>

    teleivo <mrteleivo@gmail.com> 1695eb7ec7d436b56a3de5c0821c64c2a73efbef

    Remove throws Exception from IDE code templates
    there is no need for the throws Exception clauses in the tests
    therefore removed it from the intellij and eclipse templates

    • tools/src/main/resources/eclipse/templates.xml (version 1695eb7ec7d436b56a3de5c0821c64c2a73efbef)
    • tools/src/main/resources/intellij/templates.xml (version 1695eb7ec7d436b56a3de5c0821c64c2a73efbef)
  • Ivo Ulrich <teleivo@users.noreply.github.com>

    Ivo Ulrich <teleivo@users.noreply.github.com> 3f2f4d015a2ef0d09b4f26dab9dd099c00e4b90a

    Merge pull request #2103 from teleivo/baseattributetypevalidatortest
    Clean and add tests to BaseAttributeTypeValidatorTest

  • teleivo <mrteleivo@gmail.com>

    teleivo <mrteleivo@gmail.com> eb56f8ccc8026473eb42f443fcba819a22f89e93

    Clean and add tests to BaseAttributeTypeValidatorTest
    * replace the VisitAttributeTypeValidator with an implementation added
    to this test class. Reason is the VisitAttributeTypeValidator does some
    things before calling super.validate which prevents us from testing
    validate(null, errors)
    * add test for validate(null, errors)
    * add test for minOccurs < 0
    * add test for datatypeConfig is blank when of type RegexValidatedTextDatatype
    * rename test shouldRequireDatatypeConfigurationIfDatatypeEqualsRegexValidatedText
    which was actually testing the datatypeConfig.invalid path
    * add test for wrong preferred handler type
    * add test for invalid handlerConfig
    * arrange tests to match code so reading code/test side by side is easy
    * move happy path to the end

    • api/src/test/java/org/openmrs/validator/BaseAttributeTypeValidatorTest.java (version eb56f8ccc8026473eb42f443fcba819a22f89e93)
  • Ivo Ulrich <teleivo@users.noreply.github.com>

    Ivo Ulrich <teleivo@users.noreply.github.com> 83b0f68f6fc266e36d213238db217c9fbe53d084

    Merge pull request #2102 from teleivo/allergyvalidatortest
    Extract setUp and fix tests in AllergyValidatorTest

  • teleivo <mrteleivo@gmail.com>

    teleivo <mrteleivo@gmail.com> c064839b4a8b820d15430c95b0f64976eea92497 m

    Extract setUp and fix tests in AllergyValidatorTest
    fixed errors in AllergyValidatorTest's, a few tests where just
    asserting that the "allergen" field had an error but not the actual
    code which lead to the fact that a few paths where not tested because the
    Allergy passed in did not match the test expectations (either the
    Allergen was null or the AllergenType of the Allergen not set)

    * fixed test 'shouldFailIdAllergenTypeIsNull' which passed because
    due to "allergyapi.allergen.required" coming from Allergen being null
    not from the AllergenType
    added assertion for the correct error code and passed in an Allergen to the
    Allergy with no AllergenType

    * add setUp method preparing variables needed for tests to remove
    duplication in test setup
    * arrange test implementations in a arrange, act, assert style (or what
    we often called the given,when,then) so its clear to see whats been
    tested and what the outcome should be
    * move test 'validate_shouldFailIfAllergenIsNull' one up to match the
    flow of the code. makes it easy to read code / test side by side
    * removed one duplicate call to validate

    • api/src/test/java/org/openmrs/validator/AllergyValidatorTest.java (version c064839b4a8b820d15430c95b0f64976eea92497)