Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
I've written another topic but I made a mistake with the explanation and also with the title of the topic, so I'll try once more now!
I'm doing a client-server application. The Client send data contained into a Mensaje object (previously serialized with a DataOutputStream) using a DatagramSocket. The server recieves the datagram and dumps the byte array to a new Mensaje object using a DataInputStream (that's the goal of the getRequest() function); then it processes the information, and, finally, it sends the response to the client. The communication is not the problem, it works fine.
So, to simplify, I didn't add the communication module: I'm only giving to you a function called getRequest() that recieves as argument a Mensaje object, which should be modified. To simplify, I didn't add the communication module, so, into the getRequest() function I'm simulating that server recieves a byte array (called buffer) from line 20 to 30. Then, from 32 to 41, the server retrieves data from buffer, and represents it on screen. After that, coming back to main() function, the Mensaje object data is once more time printed on screen.
Now, I will paste a simplified code that represents my problem.