%dw 2.0
import dw::tests::Asserts
---
payload must beObject()
DataWeave Assertions Library
dw::test::Asserts
This module contains the set of core Matchers to use in your tests
Example
Validates if a payload is of type Object
Functions
contain
equalToResource
equalToResource(String, String, Object): Matcher<Any>
Validates that the given value is equal to the content of a resource file
The resource file must belong to the classpath
%dw 2.0
import dw::tests::Asserts
---
{ name: "Lionel", lastName: "Messi" } must equalToResource("user.json", "application/json")