how to unit test a plain java API application using fluent builder API
Hi folks
We have been developing a command line tool for various administrative tasks in jazz. But the tool currently lacks on unit- and integration testing. So I started to do some research along the web and found some interesting posts how IBM tests the server side java API.
I've read the following articles:
https://jazz.net/blog/index.php/2013/10/03/unify-your-test-automation-for-continuous-delivery/
https://jazz.net/wiki/bin/view/Main/UnitTestingInTheRealWorld
I really like the following moking approach Jan Wloka mentions in this articles
IWorkItem expected= $.workItem().projectArea(fProjectArea).summary("existing item").stateId(UUID.generate()).build(); when(fWorkItemServerMock.findWorkItemById(eq(expected.getId()), any(ItemProfile.class), any(IProgressMonitor.class))).thenReturn(expected);
But I cannot find a way in the jazz java client api to make use of the mentioned 'fluent builder api' approach. Could anyone help me out on how to achieve this?