Originally posted by Derek Canaan:
Thanks for sharing. Could you also share how you use junit to test concurrent read-read, and read-write?
Thanks in advance,
Originally posted by Peter Yunguang Qiu:
In my DB access file, I just used RandamAccessFile. I think it is easier than use many stream classes. What do you think of it?
Using JUnit, it seems need more work than directly test. I just print out the record that been readed, and see by my eyes. It seems simpler and need less work.
Taking it to another level is a practice known as "test-driven" development. In this methodology, you actually write tests first before writing the code.