- createBeans(
- true, "target/rollingApp", null, "30MB", 1, 5, "target/%i.log",
- "rolling", "consoleName", "ALL", "logger1", "DEBUG")
+ createBeans(true, "target/rollingApp", null, "30MB", 1, 5, "target/%i.log", "rolling", "consoleName",
+ "ALL", "logger1", "DEBUG", "FixedWindowRollingPolicy", 0, "FileAppender").commit();
+ fail();
+ } catch (ValidationException e) {
+ assertThat(e.getFailedValidations().toString(), containsString("EncoderPattern is null"));
+ }
+ }
+
+ @Test
+ public void testValidation4() throws Exception {
+ try {
+ createBeans(true, "target/rollingApp", "%-4relative [%thread] %-5level %logger{35} - %msg%n", null, 1, 5,
+ "target/%i.log", "rolling", "consoleName", "ALL", "logger1", "DEBUG", "FixedWindowRollingPolicy",
+ 0, "FileAppender").commit();
+ fail();
+ } catch (ValidationException e) {
+ assertThat(e.getFailedValidations().toString(), containsString("MaxFileSize is null"));
+ }
+ }
+
+ @Test
+ public void testValidation6() throws Exception {
+ try {
+ createBeans(true, "", "%-4relative [%thread] %-5level %logger{35} - %msg%n", "30MB", 1, 5, "target/%i.log",
+ "rolling", "consoleName", "ALL", "logger1", "DEBUG", "FixedWindowRollingPolicy", 0, "FileAppender")