Fix test cases for bug 365245.
authorPatrick Tasse <patrick.tasse@gmail.com>
Fri, 9 Dec 2011 21:05:31 +0000 (16:05 -0500)
committerPatrick Tasse <patrick.tasse@gmail.com>
Fri, 9 Dec 2011 21:05:31 +0000 (16:05 -0500)
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfTraceTest.java

index 222fdf981b84834ee3fe8b61b66a4c8457a02b35..695eadba541dcdaa5970648002cf56ad85d9ef1d 100644 (file)
@@ -94,7 +94,7 @@ public class TmfTraceTest extends TestCase {
                try {
                URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(path), null);
                        File test = new File(FileLocator.toFileURL(location).toURI());
-               fTrace = new TmfTraceStub(test.getPath(), BLOCK_SIZE, false);
+               fTrace = new TmfTraceStub(test.toURI().getPath(), BLOCK_SIZE, false);
                } catch (URISyntaxException e) {
                        e.printStackTrace();
                } catch (IOException e) {
@@ -114,7 +114,7 @@ public class TmfTraceTest extends TestCase {
                try {
                URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
                        testfile = new File(FileLocator.toFileURL(location).toURI());
-                       trace = new TmfTraceStub(testfile.getPath());
+                       trace = new TmfTraceStub(testfile.toURI().getPath());
                } catch (URISyntaxException e) {
                        fail("URISyntaxException");
                } catch (IOException e) {
@@ -122,7 +122,7 @@ public class TmfTraceTest extends TestCase {
                }
                assertTrue  ("Open trace",   trace != null);
                assertEquals("getType",      TmfEvent.class, trace.getType());
-               assertEquals("getPath",      testfile.getPath(), trace.getPath());
+               assertEquals("getPath",      testfile.toURI().getPath(), trace.getPath());
                assertEquals("getName",      TEST_STREAM, trace.getName());
                assertEquals("getCacheSize", TmfTrace.DEFAULT_INDEX_PAGE_SIZE, trace.getCacheSize());
     }
@@ -133,7 +133,7 @@ public class TmfTraceTest extends TestCase {
                try {
                URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
                        testfile = new File(FileLocator.toFileURL(location).toURI());
-                       trace = new TmfTraceStub(testfile.getPath(), 0);
+                       trace = new TmfTraceStub(testfile.toURI().getPath(), 0);
                } catch (URISyntaxException e) {
                        fail("URISyntaxException");
                } catch (IOException e) {
@@ -141,7 +141,7 @@ public class TmfTraceTest extends TestCase {
                }
                assertTrue  ("Open trace",   trace != null);
                assertEquals("getType",      TmfEvent.class, trace.getType());
-               assertEquals("getPath",      testfile.getPath(), trace.getPath());
+               assertEquals("getPath",      testfile.toURI().getPath(), trace.getPath());
                assertEquals("getName",      TEST_STREAM, trace.getName());
                assertEquals("getCacheSize", TmfTrace.DEFAULT_INDEX_PAGE_SIZE, trace.getCacheSize());
     }
This page took 0.02637 seconds and 5 git commands to generate.