Firstly, I love the tutorials, and I find them very clear, and 'flawless' would be the only feedback I could give.
However, just one thing I'm a bit confused about.
In the following code, in the MyUtilitiesTest.java class, you seems to create a new File called testToSaveString.txt, but in the arguments for the following assertTrue statement, you send the file name testsaveString.txt. Shouldn't this result in the filewrite not being able to save into the file, and result in a false value for result. It comes back as true somehow. Here's the code I'm reffering to;
File testFile = new File(**"testsaveToString.txt"**);
testFile.delete();
assertFalse("File should not exist", testFile.exists());
assertTrue("File should have been saved",
MyUtilities.saveStringToFile(**"testsavestring.txt"**,
saveString));
Apologies if I have overlooked something pretty obvious.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Firstly, I love the tutorials, and I find them very clear, and 'flawless' would be the only feedback I could give.
However, just one thing I'm a bit confused about.
In the following code, in the MyUtilitiesTest.java class, you seems to create a new File called testToSaveString.txt, but in the arguments for the following assertTrue statement, you send the file name testsaveString.txt. Shouldn't this result in the filewrite not being able to save into the file, and result in a false value for result. It comes back as true somehow. Here's the code I'm reffering to;
File testFile = new File(**"testsaveToString.txt"**);
testFile.delete();
assertFalse("File should not exist", testFile.exists());
assertTrue("File should have been saved",
MyUtilities.saveStringToFile(**"testsavestring.txt"**,
saveString));
Apologies if I have overlooked something pretty obvious.
Thanks
no it saves to the END of existant file and then it fails compare strings ( i v tested it right now)