The jBallerina 1.2.7 patch release improves upon the 1.2.6 release by introducing the features listed below and addressing a number of bugs and improvements.
You can use the update tool to update to jBallerina 1.2.7 as follows.
For existing users:
If you are already using jBallerina version 1.2.0, or above, you can directly update your distribution to jBallerina 1.2.29 by executing the following command:
ballerina dist update
However, you need to use the following commands instead of the above if you have installed:
ballerina dist pull jballerina-1.2.7
For new users:
If you have not installed jBallerina, then download the installers to install.
Object mocking enables controlling the values of member variables and the behavior of the member functions of an object. The following improvements are introduced with regard to this.
Object mocking is done by using the following functions.
test:prepare()functions are used to initialize the mocking capability.
test:prepare()function allows to use the associated mocking functions like
MockFunctionobject is added to handle function mocking.
MockFunctionobjects are defined by attaching the
MockFunctionobject to specify the function to mock.
Function mocking is done by using the following functions.
test:when(mockObj)function is used to initialize the mocking capability within a particular test case.