vector input and validation unit 向量输入和合格性检查部件
To refine your unit test further, you can assert that the validation failed for a specific constraint on a specific field, as shown in Listing 8.
要进一步细化单元测试,您可以断言验证会因为特定字段上的特定约束而失败,如清单8所示。
This notifies the validation framework that any unit declared by this package should be validated by this domain validator.
这将会通知该包所声明的确认框架应该由域确认器来确认。
The second option is to mock out the validation behavior and leave the test in the unit directory.
第二个选择是模拟验证行为并将测试类保留在单元目录中。
应用推荐