Execute as many Jasper Reports tests in IDE as possible
Previously, the use of Assume.group(CUSTOM_COMPILATION) in
AbstractJasperReportsTests excluded all JR tests when executing in the
IDE (e.g., Eclipse). This commit executes the assumption only where
necessary.
@ -79,6 +83,8 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -79,6 +83,8 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@Test
publicvoidtestUncompiledReport()throwsException{
Assume.group(TestGroup.CUSTOM_COMPILATION);
if(!canCompileReport){
return;
}
@ -88,26 +94,14 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -88,26 +94,14 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
fail("Invalid path should throw ApplicationContextException");
}
catch(ApplicationContextExceptionex){
// good!
}
getView("foo.jasper");
}
@Test
@Test(expected=IllegalArgumentException.class)
publicvoidtestInvalidExtension()throwsException{
try{
getView("foo.bar");
fail("Invalid extension should throw IllegalArgumentException");
}
catch(IllegalArgumentExceptionex){
// expected
}
getView("foo.bar");
}
@Test
@ -119,7 +113,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -119,7 +113,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -128,7 +122,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -128,7 +122,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -137,8 +131,9 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -137,8 +131,9 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -149,7 +144,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -149,7 +144,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -158,8 +153,9 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -158,8 +153,9 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -171,7 +167,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -171,7 +167,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -181,7 +177,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -181,7 +177,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -192,7 +188,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -192,7 +188,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@Test
publicvoidtestWithSpecificArray()throwsException{
Mapmodel=getModel();
Map<String,Object>model=getModel();
model.remove("dataSource");
model.put("reportData",getData().toArray());
model.put("otherData",newString[0]);
@ -208,7 +204,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -208,7 +204,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
return;
}
Mapmodel=getModel();
Map<String,Object>model=getModel();
model.put("SubReportData",getProductData());
PropertiessubReports=newProperties();
@ -230,7 +226,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -230,7 +226,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
return;
}
Mapmodel=getModel();
Map<String,Object>model=getModel();
model.put("SubReportData",getProductData());
PropertiessubReports=newProperties();
@ -243,7 +239,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -243,7 +239,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
try{
view.initApplicationContext();
fail("Invalid report URL should throw ApplicationContextException");
fail("Invalid report URL should throw ApplicationContextException");
}
catch(ApplicationContextExceptionex){
// success
@ -261,14 +257,14 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -261,14 +257,14 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -281,7 +277,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -281,7 +277,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
return;
}
Mapmodel=getModel();
Map<String,Object>model=getModel();
model.put("SubReportData",getProductData());
PropertiessubReports=newProperties();
@ -339,6 +335,8 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -339,6 +335,8 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -346,7 +344,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -346,7 +344,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -360,13 +358,15 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -360,13 +358,15 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -381,6 +381,8 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -381,6 +381,8 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -412,7 +414,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -412,7 +414,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -430,7 +432,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@@ -430,7 +432,7 @@ public abstract class AbstractJasperReportsViewTests extends AbstractJasperRepor
@ -41,6 +43,8 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
@@ -41,6 +43,8 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
@Test
publicvoidtestSimpleHtmlRender()throwsException{
Assume.group(TestGroup.CUSTOM_COMPILATION);
if(!canCompileReport){
return;
}
@ -58,6 +62,8 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
@@ -58,6 +62,8 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
@ -82,6 +88,8 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
@@ -82,6 +88,8 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
@ -134,7 +142,7 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView
@@ -134,7 +142,7 @@ public class JasperReportsMultiFormatViewTests extends AbstractJasperReportsView