I am implementing some data verification library in Dart. The validating method has void return type and throws exceptions on errors. The code below shows an example.
import 'package:quiver/check.dart';
void validate(int value) {
checkArgument(value >= 0 && value <= 100);
}
In unit tests, I could use following code to test the exception case for invalid input:
expect(() => validate(-1), throwsArgumentError);
However, how to verify that the method does not throw exception for a valid input?