22 lines
811 B
C#
22 lines
811 B
C#
namespace BenchtopParserTests {
|
|
public class Tests {
|
|
[SetUp]
|
|
public void Setup() {
|
|
}
|
|
|
|
[Test]
|
|
public void Test_ProgramConfig() {
|
|
String program_config = File.ReadAllText(
|
|
Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestFiles\Program Config.txt")
|
|
);
|
|
var configs = BenchtopParser.Parser.I28_ProgramConfig(program_config);
|
|
Assert.IsNotNull(configs);
|
|
}
|
|
|
|
[Test]
|
|
public void Test_ProgramConfig_Throw_ErrorOrder() {
|
|
Exception ex = Assert.Throws<Exception>(delegate { BenchtopParser.Parser.I28_ProgramConfig("broken"); });
|
|
Assert.That(ex.Message, Is.EqualTo("Invalid Program Config, please provide an I28 Program Config file data"));
|
|
}
|
|
}
|
|
} |