EightBitNet/LR35902/LR35902.FuseTest/Tests.cs

32 lines
719 B
C#
Raw Normal View History

namespace Fuse
{
using System.Collections.Generic;
using System.IO;
public class Tests
{
public void Read(string path)
{
using (var file = new StreamReader(path))
{
this.Read(file);
}
}
public Dictionary<string, Test> Container { get; } = new Dictionary<string, Test>();
public void Read(StreamReader file)
{
while (!file.EndOfStream)
{
var test = new Test();
test.Read(file);
if (test.Valid)
{
this.Container.Add(test.Description, test);
}
}
}
}
}