diff --git a/BenchtopParser/ProgramConfig.cs b/BenchtopParser/ProgramConfig.cs index b3999e2..b11ae4f 100644 --- a/BenchtopParser/ProgramConfig.cs +++ b/BenchtopParser/ProgramConfig.cs @@ -10,16 +10,16 @@ namespace BenchtopParser { public String? ProgramNumber { get; set; } // Config Groups. TODO: rename to w/e the heck they are. - public Dictionary A = new Dictionary(); - public Dictionary I = new Dictionary(); - public Dictionary M = new Dictionary(); - public Dictionary O = new Dictionary(); - public Dictionary P = new Dictionary(); - public Dictionary R = new Dictionary(); - public Dictionary S = new Dictionary(); - public Dictionary T = new Dictionary(); - public Dictionary U = new Dictionary(); - public Dictionary X = new Dictionary(); + public Dictionary A = new(); + public Dictionary I = new(); + public Dictionary M = new(); + public Dictionary O = new(); + public Dictionary P = new(); + public Dictionary R = new(); + public Dictionary S = new(); + public Dictionary T = new(); + public Dictionary U = new(); + public Dictionary X = new(); public string Name() { if (M != null && M["Name"] != null && M["Name"].value != null) { @@ -77,7 +77,7 @@ namespace BenchtopParser { } public class ProgramConfig { - public Dictionary programs = new Dictionary(); + public Dictionary programs = new(); public ProgramConfig(String program_config_value) { Program? current = null; @@ -124,7 +124,7 @@ namespace BenchtopParser { var data = programnumber_group_data[2]; if (data.StartsWith("=")) { continue; /* comment line */ } - Configuration lineConfig = new Configuration(configLine, data); + Configuration lineConfig = new(configLine, data); // Deal with this group logic if (current != null) { diff --git a/BenchtopParser/TransducerVerify.cs b/BenchtopParser/TransducerVerify.cs index d29bd2b..4147453 100644 --- a/BenchtopParser/TransducerVerify.cs +++ b/BenchtopParser/TransducerVerify.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace BenchtopParser { public class TransducerVerify { - public Dictionary transducers = new Dictionary(); + public Dictionary transducers = new(); public int indent = 26; @@ -80,7 +80,7 @@ namespace BenchtopParser { public class Transducer { public int id; public String? name; - public Dictionary parameters = new Dictionary(); + public Dictionary parameters = new(); public Transducer(int id) { this.id = id; } diff --git a/BenchtopParserTests/Program_Config_Tests.cs b/BenchtopParserTests/Program_Config_Tests.cs index a625d92..7fd0db3 100644 --- a/BenchtopParserTests/Program_Config_Tests.cs +++ b/BenchtopParserTests/Program_Config_Tests.cs @@ -11,7 +11,7 @@ namespace BenchtopParserTests { [Test] public void Test_ProgramConfig() { - var programConfigs = new BenchtopParser.ProgramConfig(program_config_value); + BenchtopParser.ProgramConfig programConfigs = new(program_config_value); Assert.IsNotNull(programConfigs); // Check that group collecting works - @@ -38,11 +38,9 @@ namespace BenchtopParserTests { [Test] public void Test_ProgramConfig_AddToGroup() { // Adds the "namename" config to X group - BenchtopParser.Configuration config = new BenchtopParser.Configuration("namename", "b", "c", "d"); + BenchtopParser.Configuration config = new("namename", "b", "c", "d"); String group = "x"; //testing force upper check too. - BenchtopParser.Program program = new BenchtopParser.Program(); - - program.ProgramNumber = "P1"; + BenchtopParser.Program program = new(); program.AddToGroup(group, config); var check = program.X["namename"]; diff --git a/BenchtopParserTests/Transducer_Verify_Tests.cs b/BenchtopParserTests/Transducer_Verify_Tests.cs index b77dcdc..613fd24 100644 --- a/BenchtopParserTests/Transducer_Verify_Tests.cs +++ b/BenchtopParserTests/Transducer_Verify_Tests.cs @@ -10,7 +10,7 @@ namespace BenchtopParserTests { [Test] public void Test_TransducerVerify() { - BenchtopParser.TransducerVerify tv = new BenchtopParser.TransducerVerify(transducer_verify_value); + BenchtopParser.TransducerVerify tv = new(transducer_verify_value); Assert.That(tv.transducers[1].id, Is.EqualTo(1)); Assert.That(tv.transducers[1].name, Is.EqualTo("CTS D34-442 115PSIA")); }