Skip to content
Browse files

add test for 1158

  • Loading branch information...
1 parent 78855b8 commit 19b54d56ee0b53c7554b68ae2935d7a29738d179 @vladdu vladdu committed Mar 7, 2013
Showing with 24 additions and 0 deletions.
  1. +24 −0 org.erlide.model.tests/src/org/erlide/model/util/PathSerializerTest.java
View
24 org.erlide.model.tests/src/org/erlide/model/util/PathSerializerTest.java
@@ -0,0 +1,24 @@
+package org.erlide.model.util;
+
+import java.util.Collection;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.erlide.model.internal.root.PathSerializer;
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.google.common.collect.Lists;
+
+public class PathSerializerTest {
+
+ @Test
+ public void shouldFilterOutEmptyPaths() {
+ final String input = ";a;b;;c;;;d;";
+ final Collection<IPath> expected = Lists.newArrayList((IPath) new Path(
+ "a"), (IPath) new Path("b"), (IPath) new Path("c"),
+ (IPath) new Path("d"));
+ final Collection<IPath> actual = PathSerializer.unpackList(input);
+ Assert.assertArrayEquals(expected.toArray(), actual.toArray());
+ }
+}

0 comments on commit 19b54d5

Please sign in to comment.
Something went wrong with that request. Please try again.