I\'m beginner, and keep yourself in hands. I have some easy program, and I need do junit test for write method. I have some collection in input. How I can do this? This my
You seem to have the right idea so I am not sure what you need help with exactly...
can we join both tests(write/read)
yes.
or better do this individually(coz if our test fall we don't know where is problem - in read or write)?
Better but harder to maintain.
How should make this correctly at junit(with prepare to test, and test itself)?
Create some dummy data, in code or in a text file.
In the first case, write out the file and read it back in as check it is the same.
In the second case, you can read the text file and write it out again, and check it is the same.