Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CollectionUtils Test #64

Open
JPDSousa opened this issue Oct 20, 2017 · 2 comments
Open

Fix CollectionUtils Test #64

JPDSousa opened this issue Oct 20, 2017 · 2 comments
Assignees

Comments

@JPDSousa
Copy link
Owner

CollectionUtils is not being properly tested.

@yashdeeph709
Copy link
Contributor

Can you tell what do we want from it. I am unable to find a suitable test that should be added!

@JPDSousa
Copy link
Owner Author

The problem i found out with the tests for CollectionUtils is that it is not being tested in for a real use-case scenario.

At the moment, CollectionUtils is used in only in the ByteCollectionCodec so that byte arrays can be deserialized back to the original type. In the future i want to use it in array serilialization/deserialization for the same purposes.

What i want is to be able to test something like this:

Collection<T> col1 = new HashSet<T>();
Collection<T> sameTypeAsCol1 = CollectionUtils.create(col1.getClass());

However, i was getting some compile time errors due to class casting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants