refined use of generics
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,16 +23,6 @@ import org.springframework.context.support.StaticApplicationContext;
|
||||
*/
|
||||
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);
|
||||
@@ -44,4 +34,5 @@ public abstract class AbstractConfigurableJasperReportsViewTests extends Abstrac
|
||||
// success
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -78,7 +78,8 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
|
||||
|
||||
JasperReportsMultiFormatView view = (JasperReportsMultiFormatView) getView(UNCOMPILED_REPORT);
|
||||
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
Map<String, Class<? extends AbstractJasperReportsView>> mappings =
|
||||
new HashMap<String, Class<? extends AbstractJasperReportsView>>();
|
||||
mappings.put("test", ExporterParameterTestView.class);
|
||||
|
||||
Map<String, String> exporterParameters = new HashMap<String, String>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,7 +28,8 @@ public class JasperReportsMultiFormatViewWithCustomMappingsTests extends JasperR
|
||||
protected AbstractJasperReportsView getViewImplementation() {
|
||||
JasperReportsMultiFormatView view = new JasperReportsMultiFormatView();
|
||||
view.setFormatKey("fmt");
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
Map<String, Class<? extends AbstractJasperReportsView>> mappings =
|
||||
new HashMap<String, Class<? extends AbstractJasperReportsView>>();
|
||||
mappings.put("csv", JasperReportsCsvView.class);
|
||||
mappings.put("comma-separated", JasperReportsCsvView.class);
|
||||
mappings.put("html", JasperReportsHtmlView.class);
|
||||
|
||||
Reference in New Issue
Block a user