Fixed whitespace dependent tests in config-persister-directory-adapter 63/5563/3
authorMichal Polkorab <michal.polkorab@pantheon.sk>
Fri, 7 Mar 2014 10:13:00 +0000 (11:13 +0100)
committerMichal Polkorab <michal.polkorab@pantheon.sk>
Tue, 11 Mar 2014 08:36:24 +0000 (09:36 +0100)
Change-Id: I487011b2628d1b229d72fce19a37425c6a109a64
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
opendaylight/config/config-persister-directory-adapter/src/test/java/org/opendaylight/controller/config/persist/storage/directory/DirectoryStorageAdapterTest.java

index 3ae2906..278d0d2 100644 (file)
@@ -91,8 +91,11 @@ public class DirectoryStorageAdapterTest {
     private void assertSnapshot(ConfigSnapshotHolder result, String directory) throws Exception {
         SortedSet<String> expectedCapabilities = new TreeSet<>(IOUtils.readLines(getClass().getResourceAsStream("/" + directory + "/expectedCapabilities.txt")));
         String expectedSnapshot = IOUtils.toString(getClass().getResourceAsStream("/" + directory + "/expectedSnapshot.xml"));
+        expectedSnapshot = expectedSnapshot.replaceAll("\r","");
+        String _snapshot = result.getConfigSnapshot();
+        _snapshot = _snapshot.replaceAll("\r","");
         assertEquals(expectedCapabilities, result.getCapabilities());
-        assertEquals(expectedSnapshot, result.getConfigSnapshot());
+        assertEquals(expectedSnapshot, _snapshot);
     }
 
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.