我正在模仿MockMultipartHttpServletRequest,如下所示。当我调试这个单一的测试用例时,能不能告诉我java.lang.reflect.InvocationTargetException的原因。
@ActiveProfiles("development")
@ContextConfiguration(locations = {
"classpath:asia/embla/fre/test/config/service-context.xml",
"classpath:asia/embla/fre/test/config/data-context.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
public class BIMDrawingServiceTest {
//private String ifcFilePath = "resources/Famacweb-Architect-2016-07-04.ifc";
@Autowired
private BIMDrawingService bimService;
@Test
public void manageUpload(){
try {
//MultipartFile file = new MockMultipartFile("file", "Famacweb-Architect-2016-07-04.ifc", "text/plain", new FileInputStream(ifcFile));
MockMultipartHttpServletRequest request = new MockMultipartHttpServletRequest();
// assertEquals("File name should be equal", "", "");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}