ref #9737: adapt test to dummy lines
authorKatja Luther <k.luther@bgbm.org>
Mon, 23 Aug 2021 09:19:20 +0000 (11:19 +0200)
committerKatja Luther <k.luther@bgbm.org>
Mon, 23 Aug 2021 09:19:20 +0000 (11:19 +0200)
cdmlib-io/src/test/java/eu/etaxonomy/cdm/io/cdmLight/out/CdmLightExportTest.java

index e71e8ed8586ca00af98a5c742f3bc291d4aba6a6..2eaf8123a3560b5c76eee861e2b954e4d84bc43c 100755 (executable)
@@ -296,11 +296,15 @@ public class CdmLightExportTest extends CdmTransactionalIntegrationTest{
                     stream = new ByteArrayInputStream(data.get(CdmLightExportTable.SYNONYM.getTableName()));
                     // now there are always all tables also if empty
                     reader = new BufferedReader(new InputStreamReader(stream, Charset.forName("UTF-8")));
-                    count = 0;
+
+                    boolean dummyLine = true;
                     while ((line = reader.readLine()) != null) {
-                        count ++;
+                        if (!(line.startsWith("\"DUMMY") || line.startsWith("\"Synonym_ID"))){
+                            dummyLine = dummyLine && false;
+                        }
+
                     }
-                    Assert.assertTrue("There should be 0 synomyms", count == 1);
+                    Assert.assertTrue("There should be 0 synomyms", dummyLine);
 //                    Assert.fail("There should not be a synonym table, because the only synonym is not public.");
                 }catch(NullPointerException e){
                     //OK, should be thrown