Overview of jBallerina 1.2.7
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:
- jBallerina 1.2.0 but switched to a previous version:
ballerina dist pull jballerina-1.2.7
- a jBallerina version below 1.1.0: install via the installers
For new users:
If you have not installed jBallerina, then download the installers to install.
When a CSV file has an empty record, the previous implementation panicked. This is fixed with this release.
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.
- Ability to create a test double, which provides an equivalent mock in place of the real object
- Capability of stubbing the member function or member variable
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
- The mocking API also supports scoping and stubbing of mock functions that are declared for functions in imported modules
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
- This allows you to use the associated mocking functions like