测试方法如果想调用私有函数

// 試験方法(neCollectionCheck)
boolean result = ReflectionTestUtils.invokeMethod(collectionService_, "neCollectionCheck", getNeInfo(),
vlanUsageUsedIndexList);

 

collectionService_:类名

neCollectionCheck:方法名

getNeInfo(),  vlanUsageUsedIndexList:方法的输入参数

posted @ 2023-03-17 15:37  linxiaofeng  阅读(23)  评论(0)    收藏  举报