Register now or log in to join your professional community.
<p>how you can write your unit tests, so when the development code changes there contracts, you do not need to fix all your unit tests.</p>
you need to look at developer code from the point of legacy code. you hide legacy code complexity by using design patterns like adapter and facade.
for the unit test, i suppose to be the code what different combinations of data that unit of code which i'm testing will suppose to take and respective outputs it had to give, based on that I had to do my unit test. if there is any changes in code, i first need to test the code which is changed. thereafter I can use the api to test the functionality of the code which is using that api. otherwise no point of bypassing it and testing.