refactor names, move file to setup (duh, faster)

This commit is contained in:
Tyrel Souza 2022-07-26 01:23:41 -04:00
parent a6ffcd9585
commit 3a15e6454d
3 changed files with 13 additions and 9 deletions

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

View File

@ -1,15 +1,17 @@
namespace BenchtopParserTests {
public class I28_Program_Config_Tests {
public class Program_Config_Tests {
public String program_config_value;
[SetUp]
public void Setup() {
program_config_value = File.ReadAllText(
Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestFiles\Program Config.txt")
);
}
[Test]
public void Test_ProgramConfig() {
String program_config = File.ReadAllText(
Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestFiles\Program Config.txt")
);
var programConfigs = BenchtopParser.I28.Load_ProgramConfig(program_config);
var programConfigs = BenchtopParser.I28.Load_ProgramConfig(program_config_value);
Assert.IsNotNull(programConfigs);
// Check that group collecting works -

View File

@ -1,15 +1,16 @@
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() {
String transducer_verify = File.ReadAllText(
Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestFiles\Transducer Verify.txt")
);
BenchtopParser.TransducerVerify tv = BenchtopParser.I28.Load_TransducerVerify(transducer_verify);
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"));
}