Search Results

Search found 2 results on 1 pages for 'tayeb ghagha'.

Page 1/1 | 1 

  • Get/save parameters to an expected JMock method call?

    - by Tayeb
    Hi, I want to test an "Adapter" object that when it receives an xml message, it digest it to a Message object, puts message ID + CorrelationID both with timestamps and forwards it to a Client object.=20 A message can be correlated to a previous one (e.g. m2.correlationID =3D m1.ID). I mock the Client, and check that Adapter successfully calls "client.forwardMessage(m)" twice with first message with null correlationID, and a second with a not-null correlationID. However, I would like to precisely test that the correlationIDs are set correctly, by grabing the IDs (e.g. m1.ID). But I couldn't find anyway to do so. There is a jira about adding the feature, but no one commented and it is unassigned. Is this really unimplemented? I read about the alternative of redesigning the Adapter to use an IdGenerator object, which I can stub, but I think there will be too many objects.=20 Don't you think it adds unnecessary complexity to split objects to a so fine granularity? Thanks, and I appreciate any comments :-) Tayeb

    Read the article

  • successives operations with C++

    - by Tayeb Ghagha
    How can I perform this code: if a number n is divisible by 3, add 4 to n; if n is not divisible by 3 but by 4, divise n by 2; if n is not divisible by 3, not by 4, make n=n-1. The problem with me is that I don't know how to make this successively. For example: with the number 6, I have to have: 6, 10, 9, 13, 12, 16, 8, 4, 2, 1 et 0 6+4=10; 10-1=9; 9+4=13; 13-1=12; 12+4=16; 16/2=8.....0 This makes 10 operations. So my program has to return: 6---10 Thank you for help

    Read the article

1