public void NamedValue_AllNamed_LessNByte_OK() { int numberOfData = 100; int NumberOfMissingData = 2; //TLV Object Creation TLValue expected = new TLValue(); expected.Name = "ola testing ah"; expected.Value = repeat("0C", NumberOfMissingData); expected.Length = expected.Value.Length / 2; expected.Tag = "0A"; // XML definition Creation XElement XE = DefineXMLForTLValue_def_Multi(expected, numberOfData - NumberOfMissingData); // set the expected result PairResult[] expPair = DefineListExpectedforTLValue_mix_def_multi_ok(expected, NumberOfMissingData).ToArray(); TLValue res = (TLValue)xmlParser.getItem(XE); PairResult[] resPair = res.GetValueOutput(); //validate the result ComparisonHelper.Compare(expPair, resPair); }
public void NamedValue_AllNamed_Residue_OK() { string residueVal = "0B0B"; string residueDesc = "this is residue"; //TLV Object Creation TLValue expected = new TLValue(); expected.Name = "ola testing ah"; expected.Value = "0C" + residueVal; expected.Length = expected.Value.Length / 2; expected.Tag = "0A"; // XML definition Creation XElement XE = DefineXMLForTLValue_def_ok_residued(expected, residueDesc); // set the expected result PairResult[] expPair = DefineListExpectedforTLValue_def_ok_residued(expected, residueVal, residueDesc).ToArray(); TLValue res = (TLValue)xmlParser.getItem(XE); PairResult[] resPair = res.GetValueOutput(); //validate the result ComparisonHelper.Compare(expPair, resPair); }
public void NamedValue_OneNamed_2Byte_OK() { //TLV Object Creation TLValue expected = new TLValue(); expected.Name = "ola testing ah"; expected.Value = "000C0C"; expected.Length = expected.Value.Length / 2; expected.Tag = "0A"; // XML definition Creation XElement XE = DefineXMLForTLValue_mix_def_ok(expected, 2); // set the expected result PairResult[] expPair = DefineListExpectedforTLValue_mix_def_ok(expected, 2).ToArray(); TLValue res = (TLValue)xmlParser.getItem(XE); PairResult[] resPair = res.GetValueOutput(); //validate the result ComparisonHelper.Compare(expPair, resPair); }