<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 1: Persistence #3 - Filename in MyUtilitiesTest</title><link href="https://sourceforge.net/p/eclipsetutorial/bugs/1/" rel="alternate"/><link href="https://sourceforge.net/p/eclipsetutorial/bugs/1/feed.atom" rel="self"/><id>https://sourceforge.net/p/eclipsetutorial/bugs/1/</id><updated>2011-06-02T19:21:51Z</updated><subtitle>Recent changes to 1: Persistence #3 - Filename in MyUtilitiesTest</subtitle><entry><title>Persistence #3 - Filename in MyUtilitiesTest</title><link href="https://sourceforge.net/p/eclipsetutorial/bugs/1/" rel="alternate"/><published>2011-06-02T19:21:51Z</published><updated>2011-06-02T19:21:51Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net5ed2351bb9aef0b1836df53a5de6f414ad7cfcd3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In the Persistence tutorial, chapter 3, there are some statemente addes to the test method named saveStringToFile of the MyUtilitiesTest class.&lt;br /&gt;
At first the filename used is "testsavetostring,txt"&lt;br /&gt;
&amp;gt;&amp;gt;  File testFile = new File("testsavetostring.txt");&lt;br /&gt;
&amp;gt;&amp;gt;  testFile.delete();&lt;br /&gt;
&amp;gt;&amp;gt;  assertFalse("File should not exist",testFile.exists());&lt;br /&gt;
and with these lines you can be sure that the file "testsavetosting.txt" doesn't exist. &lt;br /&gt;
But afterwards in the assert..-statements the filename referenced is spelled "testsavestring.txt" (without the 'to').&lt;br /&gt;
Because the filenames don't match, you can't be sure, that you accidentally run the following tests with an current version of the file (because the "testsavestring.txt" is obviously not deleted).&lt;br /&gt;
The solution is rather simple: remove the 'to' in the filename as follows 'File testFile = new File("testsavestring.txt").&lt;br /&gt;
By the way: Great effort, the tutorials are very helpful.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>