@@ -101,13 +101,23 @@ public void testNative() throws Exception {
101101
102102 @ Test
103103 public void testProperties () throws Exception {
104- File buildFile = new File (baseFolder , "properties/build.xml" );
105- Project project = createProject (buildFile );
106- assertNotNull (project );
107- // File fooSqlFile = new File(baseFolder, "native/generated/foo.sql");
108- // assertFalse(fooSqlFile.exists());
109- project .executeTarget ("reveng" );
110- // assertTrue(fooSqlFile.exists());
104+ PrintStream savedOut = System .out ;
105+ try {
106+ File buildFile = new File (baseFolder , "properties/build.xml" );
107+ Project project = createProject (buildFile );
108+ assertNotNull (project );
109+ ByteArrayOutputStream out = new ByteArrayOutputStream ();
110+ System .setOut (new PrintStream (out ));
111+ assertFalse (out .toString ().contains ("Hello, World!" ));
112+ assertFalse (out .toString ().contains ("Hello, Foo!" ));
113+ assertFalse (out .toString ().contains ("Hello, Bar!" ));
114+ project .executeTarget ("reveng" );
115+ assertTrue (out .toString ().contains ("Hello, World!" ));
116+ assertTrue (out .toString ().contains ("Hello, Foo!" ));
117+ assertTrue (out .toString ().contains ("Hello, Bar!" ));
118+ } finally {
119+ System .setOut (savedOut );
120+ }
111121 }
112122
113123 private Project createProject (File buildXmlFile ) throws Exception {
0 commit comments