samedi 23 janvier 2016

Assert building of QuerySpec object of DynamoDB in unit test cases

I have a class which takes care of converting a POJO into QuerySpec object of DynmaoDB. The method signature is like below

QuerySpec buildQuerySpec(MyRequest myRequest)

I am trying to write a test case to check whether correct QuerySpec object is being built or not.

But comparing each and every attribute of QuerySpec can be very time consuming, as I am just setting only 3-4 attributes of QuerySpec.

I see that QuerySpec doesn't override equals() method. Is there any way to easily compare QuerySpecs? Any other standard way to write test case for this?

Thanks, Harish

Aucun commentaire:

Enregistrer un commentaire