Exemplo n.º 1
0
 public void toStringDictionary_BadResponse()
 {
     VistaUtils.toStringDictionary(
         new String[] {
         "nokeyvalue"
     }
         );
 }
 public StringDictionary getLookupTable(string fileNum)
 {
     if (!lookupTables.ContainsKey(fileNum))
     {
         DdrLister query    = buildIenNameQuery(fileNum);
         string[]  response = query.execute();
         lookupTables.Add(fileNum, VistaUtils.toStringDictionary(response));
     }
     return((StringDictionary)lookupTables[fileNum]);
 }
Exemplo n.º 3
0
 public void toStringDictionary_DuplicateKeys()
 {
     VistaUtils.toStringDictionary(
         new String[] {
         "lower1^lower1value",
         "lower2^lower2value",
         "LOWER1^LOWER1value"
     }
         );
 }
Exemplo n.º 4
0
        public void toStringDictionary()
        {
            Assert.IsNull(VistaUtils.toStringDictionary(null));
            Assert.IsNull(VistaUtils.toStringDictionary(new String[] {}));

            StringDictionary expected = new StringDictionary();

            expected.Add("lower1", "lower1value");
            expected.Add("lower2", "lower2value");
            expected.Add("lower3", "lower3value");

            StringDictionary result = VistaUtils.toStringDictionary(
                new String[] {
                "lower1^lower1value",
                "lower2^lower2value",
                "lower3^lower3value"
            }
                );

            Assert.AreEqual(new TOEqualizer(expected).HashCode, new TOEqualizer(result).HashCode);
        }