2019-07-19 22:59:32 +00:00
|
|
|
|
namespace Fuse
|
|
|
|
|
{
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
public class Tests
|
|
|
|
|
{
|
2019-07-20 18:17:08 +00:00
|
|
|
|
private readonly Lines lines;
|
2019-07-19 22:59:32 +00:00
|
|
|
|
|
|
|
|
|
public Dictionary<string, Test> Container { get; } = new Dictionary<string, Test>();
|
|
|
|
|
|
2019-07-20 18:17:08 +00:00
|
|
|
|
public Tests(string path) => this.lines = new Lines(path);
|
|
|
|
|
|
|
|
|
|
public void Read() => this.lines.Read();
|
|
|
|
|
|
|
|
|
|
public void Parse()
|
2019-07-19 22:59:32 +00:00
|
|
|
|
{
|
2019-07-20 18:17:08 +00:00
|
|
|
|
while (!this.lines.EndOfFile)
|
2019-07-19 22:59:32 +00:00
|
|
|
|
{
|
|
|
|
|
var test = new Test();
|
2019-07-20 18:17:08 +00:00
|
|
|
|
test.Parse(this.lines);
|
2019-07-19 22:59:32 +00:00
|
|
|
|
if (test.Valid)
|
|
|
|
|
{
|
|
|
|
|
this.Container.Add(test.Description, test);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|