Cosmos/Tests/Cosmos.Kernel.Tests.Fat/System.IO/StreamReaderTest.cs
fanoI 806e6e9e89 More FAT work
- Make DirectoryInfo work
- Refactored FAT TestRunner in a similar way to the BCL one
- Bugfix: Path.GetTempPath() did not returned a complete path
- Added to VFS "naive" support to Get / Set file attributes (for now only Get is supported)
- Added more debug logs
2017-09-24 18:12:58 +02:00

35 lines
1,009 B
C#

using System.IO;
using Cosmos.TestRunner;
using Cosmos.Debug.Kernel;
namespace Cosmos.Kernel.Tests.Fat.System.IO
{
class StreamReaderTest
{
/// <summary>
/// Tests System.IO.StreamReader plugs.
/// </summary>
public static void Execute(Debugger mDebugger)
{
mDebugger.Send("START TEST: StreamReader:");
mDebugger.Send("Create StreamReader");
using (var xSR = new StreamReader(@"0:\test.txt"))
{
if (xSR != null)
{
mDebugger.Send("Start reading");
var content = xSR.ReadToEnd();
Assert.IsTrue(content == "A line of text for testing\nSecond line", "Content: " + content);
}
else
{
Assert.IsTrue(false, @"Failed to create StreamReader for file 0:\test.txt");
}
}
mDebugger.Send("END TEST");
}
}
}