2

I've implemented a key-value collection, that's accessible as a dictionary (so values can be retrieved by keys) and a list of entries (key-value pairs).

I'm not a tester myself and I have a hard time coming up with a good test cases to see, if there isn't some bug in implementation - but I didn't find through google any "typical" cases for quite a typical functionality.

I've added bunch of records, I've retrieved them (by key, by iteration), comparing to the source keys and values lists, I've created a test where I add records then delete random ones to see, if all remaining are actually there, but I wonder what I might be missing, before I start using that collection in my code.

To summarize: can anyone provide a list - just high-level concepts - what to test a key-value collection for?

1 Answer 1

2

Try Googling for Java Hashmap test. I very quickly found this, and I am sure you can find many others.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.