It's all about the answers!

Ask a question

how to unit test a plain java API application using fluent builder API


Lukas Steiger (3131628) | asked Feb 20 '14, 9:49 a.m.
edited Feb 21 '14, 3:10 a.m.
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?


Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.