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 Composer_2Sets_2TLValue_ExtraData() { string testVal = "04022233090244550402223309024455" + "112233665544222"; composer_BasicTLV.ParseValueInput(testVal); PairResult[] expected = Get2PairResults(value_basicTLV_1, value_basicTLV_2, value_basicTLV_1, value_basicTLV_2); PairResult[] result = composer_BasicTLV.getValue(testVal); // exersize it! ComparisonHelper.Compare(expected, result); }
public void Composer_2Sets_2TLValue_OK() { string testVal = "04022233090244550402223309024455"; composer_BasicTLV.ParseValueInput(testVal); PairResult[] expected = Get2PairResults(value_basicTLV_1, value_basicTLV_2, value_basicTLV_1, value_basicTLV_2); int numberOfExpectedSets = 2; int numberOfResultSets; PairResult[] result = composer_BasicTLV.getValue(testVal, out numberOfResultSets); // exersize it! Assert.AreEqual(numberOfExpectedSets, numberOfResultSets); ComparisonHelper.Compare(expected, result); }
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); }