Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?


0 votes


Be the first one to answer this question!

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 411
× 169
× 8

Question asked: Feb 20 '14, 9:49 a.m.

Question was seen: 6,737 times

Last updated: Feb 21 '14, 3:10 a.m.

Confirmation Cancel Confirm