/// <summary> /// Adds the test case. /// </summary> /// <param name="symbology">The symbology.</param> /// <param name="text">The text.</param> public void AddTestCase(BarcodeSymbology symbology, List <string> text) { // We cannot add unknown symbology to test-case list if (symbology == BarcodeSymbology.Unknown) { throw new ArgumentException("symbology"); } // Insert into existing group if we have one //foreach (SymbologyTestGroup group in GroupTests) //{ // if (group.Symbology == symbology) // { // group.AddTestCase(text); // return; // } //} // Create new group as required. SymbologyTestGroup newGroup = new SymbologyTestGroup(symbology); foreach (var item in text) { newGroup.AddTestCase(item); } GroupTests.Add(newGroup); }
/// <summary> /// Adds the test case. /// </summary> /// <param name="symbology">The symbology.</param> /// <param name="text">The text.</param> public void AddTestCase(BarcodeSymbology symbology, string text) { // We cannot add unknown symbology to test-case list if (symbology == BarcodeSymbology.Unknown) { throw new ArgumentException("symbology"); } // Insert into existing group if we have one foreach (SymbologyTestGroup group in GroupTests) { if (group.Symbology == symbology) { group.AddTestCase(text); return; } } // Create new group as required. SymbologyTestGroup newGroup = new SymbologyTestGroup(symbology); newGroup.AddTestCase(text); GroupTests.Add(newGroup); }