- 1.2.55
- 1.2.54
- 1.2.53
- 1.2.52
- 1.2.51
- 1.2.50
- 1.2.49
- 1.2.48
- 1.2.47
- 1.2.46
- 1.2.45
- 1.2.44
- 1.2.43
- 1.2.42
- 1.2.41
- 1.2.40
- 1.2.39
- 1.2.38
- 1.2.37
- 1.2.36
- 1.2.35
- 1.2.34
- 1.2.33
- 1.2.32
- 1.2.31
- 1.2.30
- 1.2.29
- 1.2.28
- 1.2.27
- 1.2.26
- 1.2.25
- 1.2.24
- 1.2.23
- 1.2.22
- 1.2.21
- 1.2.20
- 1.2.19
- 1.2.18
- 1.2.17
- 1.2.16
- 1.2.15
- 1.2.14
- 1.2.13
- 1.2.12
- 1.2.11
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
Overview of jBallerina 1.2.7
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 {{ site.data.stable-latest.metadata.version }} 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.
Standard library
I/O
When a CSV file has an empty record, the previous implementation panicked. This is fixed with this release.
Developer tools
Test framework
Object mocking
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.
- The
test:mock()
andtest:prepare()
functions are used to initialize the mocking capability - The
test:prepare()
function allows to use the associated mocking functions likethenReturn()
,thenReturnSequence()
,doNothing()
, andwithArguments()
Function mocking
- The
MockFunction
object is added to handle function mocking.MockFunction
objects are defined by attaching the@test:Mock
to theMockFunction
object 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.
- The
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
call()
,thenReturn()
, andwithArguments()