Not really, contracts can't send in invalid data to see what happens and ensure the proper actions are taken.
Contracts don't prevent the need for tests, they simply augment them. Contracts only state assumptions about how code should behave, but they don't make sure those assumptions are correct, only tests can do that.
Contracts don't prevent the need for tests, they simply augment them. Contracts only state assumptions about how code should behave, but they don't make sure those assumptions are correct, only tests can do that.