📄 abstractconfigurablejasperreportsviewtests.java
字号:
package org.springframework.web.servlet.view.jasperreports;
import org.springframework.context.support.StaticApplicationContext;
/**
* @author robh
*/
public abstract class AbstractConfigurableJasperReportsViewTests extends AbstractJasperReportsViewTests {
public void testSetInvalidExporterClass() throws Exception {
try {
new ConfigurableJasperReportsView().setExporterClass(String.class);
fail("Should not be able to set invalid view class.");
}
catch (IllegalArgumentException ex) {
// success
}
}
public void testNoConfiguredExporter() throws Exception {
ConfigurableJasperReportsView view = new ConfigurableJasperReportsView();
view.setUrl(COMPILED_REPORT);
try {
view.setApplicationContext(new StaticApplicationContext());
fail("Should not be able to setup view class without an exporter class.");
}
catch (IllegalArgumentException e) {
// success
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -