GitHub user m4rkmckenna opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/1049

    Added utility `TestFrameworkAssertions` to address comments from #999

    TestFrameworkAssertions is a common class used by [TestSensor,TestHttpCall] 
instead of each entity having its own assertions
    
    ### Changes to [TestSensor,TestHttpCall] blueprint
    ###### Previous Assert
    ```
    assert:
      isEqualTo: SomeValue
    ```
    ###### Current Assert
    ```
    assert:
    - isEqualTo: SomeValue
    ```
    Currently Supported assertions 
[isNull,notNull,isEqualTo,equalTo,equals,matches,contains]
    
    ### Changes to TestHttpCall
    Added new config key `applyAssertionTo` possible values [body,status]
    ###### Previous Test Http Status
    ```
    type: org.apache.brooklyn.test.framework.TestHttpCall
    name: Assert 200 OK
    url: http://localhost:8081
    assert:
      status: 200
    ```
    ###### Current Test Http Status
    ```
    type: org.apache.brooklyn.test.framework.TestHttpCall
    name: Assert 200 OK
    url: http://localhost:8081
    applyAssertionTo: status
    assert:
    - isEqualTo: 200
    ```
    
    Note: #1031 Will have to be updated 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/m4rkmckenna/incubator-brooklyn 
test-framework-asserts

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/1049.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1049
    
----
commit c129f06441615eb75e64316c37915ba88135bed4
Author: Mark McKenna <[email protected]>
Date:   2015-11-11T18:06:55Z

    Added utility class `TestFrameworkAssertions` to address comments from #999
    
    TestFrameworkAssertions is a common class used by [TestSensor,TestHttpCall] 
instead of each entity having its own assertions
    
    Changes to TestHttpCall
    Added new config key `applyAssertionTo` possible values [body,status]
    
    Changes to [TestSensor,TestHttpCall] blueprint
      Previous::
      assert:
        isEqualTo: SomeValue
      Now::
      assert:
      - isEqualTo: SomeValue
    
    Currently Supported assertions 
[isNull,notNull,isEqualTo,equalTo,equals,matches,contains]

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to