public class BaseRequestTest { @Test public void testValidation() { // SetUp ValidateAnnotationTestUtil validateAnnotationTest = new ValidateAnnotationTestUtil(BaseRequest::new); // テスト対象項目の定義値を設定 ItemInfo[] itemInfoArray = { new ItemInfo("name").isRequired().isAlphabetNumber().max(10), new ItemInfo("userId").isRequired().isAlphabetNumber().min(8).max(12), }; // Exercise・Verify validateAnnotationTest.testValidateAnnotation(Arrays.asList(itemInfoArray)); } @Test public void test() throws Exception { DtoTestUtil.dtoTest(BaseRequest::new); } }
とテストコードに書かれていたのですが、
BaseRequest::new
の
::new
が何の機能を持っているのかわかりません。
::newは何を意味するものなのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。