android – How and what are unit test case for data class using mockito or hamcrest in kotlin-ThrowExceptions

Exception or error:
data class User(val name : String?, val age : Int?)

This is my data class i want write unit test case so that it should give 100 percent coverage also i want to write all test case for null safety so that if variable can accept null value also please suggest me what are the test case how so write test case using mockito or hamcrest .

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *