3 ms·
If you correctly use interfaces for your contracts, how can your mocks ever be out of date? Your compilation step would fail.
by Aeolun 5y ago
If you correctly use interfaces for your contracts, how can your mocks ever be out of date?
Your compilation step would fail.
- bhawks 5y agoContracts cover more than what type systems on most common languages can express. For instance popping a stack with no elements throws an exception. Or similarly constructing an object with certain propertied set cause methods on the object to behave differently. Mocked objects at best encode what the behavior of a certain subset of interactions should be - at a certain point in time.