25 lines
1.0 KiB
C#
25 lines
1.0 KiB
C#
namespace BenchtopParserTests {
|
|
public class Transducer_Verify_Tests {
|
|
public String transducer_verify_value;
|
|
[SetUp]
|
|
public void Setup() {
|
|
transducer_verify_value = File.ReadAllText(
|
|
Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestFiles\Transducer Verify.txt")
|
|
);
|
|
}
|
|
|
|
[Test]
|
|
public void Test_TransducerVerify() {
|
|
BenchtopParser.TransducerVerify tv = BenchtopParser.I28.Load_TransducerVerify(transducer_verify_value);
|
|
Assert.That(tv.transducers[1].id, Is.EqualTo(1));
|
|
Assert.That(tv.transducers[1].name, Is.EqualTo("CTS D34-442 115PSIA"));
|
|
}
|
|
|
|
|
|
[Test]
|
|
public void Test_TransducerVerify_Throw_InvalidProgram() {
|
|
Exception ex = Assert.Throws<Exception>(delegate { BenchtopParser.I28.Load_TransducerVerify("broken"); });
|
|
Assert.That(ex.Message, Is.EqualTo("Invalid Transducer Verify Report, please provide a Transducer Verify Report file data"));
|
|
}
|
|
}
|
|
} |