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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Dynamic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

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

View File

@ -1,15 +1,16 @@
namespace BenchtopParserTests { namespace BenchtopParserTests {
public class Transducer_Verify_Tests { public class Transducer_Verify_Tests {
public String transducer_verify_value;
[SetUp] [SetUp]
public void Setup() { public void Setup() {
transducer_verify_value = File.ReadAllText(
Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestFiles\Transducer Verify.txt")
);
} }
[Test] [Test]
public void Test_TransducerVerify() { public void Test_TransducerVerify() {
String transducer_verify = File.ReadAllText( BenchtopParser.TransducerVerify tv = BenchtopParser.I28.Load_TransducerVerify(transducer_verify_value);
Path.Combine(TestContext.CurrentContext.TestDirectory, @"TestFiles\Transducer Verify.txt")
);
BenchtopParser.TransducerVerify tv = BenchtopParser.I28.Load_TransducerVerify(transducer_verify);
Assert.That(tv.transducers[1].id, Is.EqualTo(1)); Assert.That(tv.transducers[1].id, Is.EqualTo(1));
Assert.That(tv.transducers[1].name, Is.EqualTo("CTS D34-442 115PSIA")); Assert.That(tv.transducers[1].name, Is.EqualTo("CTS D34-442 115PSIA"));
} }