benchtopparser/BenchtopParserTests/UnitTest1.cs

22 lines
811 B
C#
Raw Normal View History

2022-07-25 04:10:26 +00:00
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);
}
2022-07-25 04:16:15 +00:00
[Test]
2022-07-25 04:10:26 +00:00
public void Test_ProgramConfig_Throw_ErrorOrder() {
2022-07-25 04:16:15 +00:00
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"));
2022-07-25 04:10:26 +00:00
}
}
}