public void TryParseSingle(string name, string arg)
        {
            Assert.AreEqual(true, GenericTypeArgument.TryParseBracketedList(name, 0, 1, out var args));
            var typeArgument = args.Single();

            Assert.AreEqual(arg, typeArgument.MetadataName);
            Assert.AreEqual(null, typeArgument.TypeArguments);
        }
        public void TryGetGenericWhenKeyValuePair(string name, string arg0, string arg1)
        {
            Assert.AreEqual(true, GenericTypeArgument.TryParseBracketedList(name, 0, 2, out var args));
            var typeArgument = args[0];

            Assert.AreEqual(arg0, typeArgument.MetadataName);
            Assert.AreEqual(null, typeArgument.TypeArguments);
            typeArgument = args[1];
            Assert.AreEqual(arg1, typeArgument.MetadataName);
            Assert.AreEqual(null, typeArgument.TypeArguments);
        }
Пример #3
0
 /**
  * Call back method that must be called as soon as the given <code>
  * GenericTypeArgument</code> object has been traversed.
  *
  * @param pGenericTypeArgument  The <code>GenericTypeArgument</code> object
  *                              that has just been traversed.
  */
 public void actionPerformed(
      
     GenericTypeArgument pGenericTypeArgument)
 {
     // Nothing to do.
 }
Пример #4
0
 /**
  * Call back method that must be called when the given <code>
  * GenericTypeArgument</code> will become the next <i>traverse
  * candidate</i>.
  *
  * @param pGenericTypeArgument  The <code>GenericTypeArgument</code> object
  *                              that will become the next <i>traverse
  *                              candidate</i>.
  */
 public void performAction(
      
     GenericTypeArgument pGenericTypeArgument)
 {
     // Nothing to do.
 }
 public void TryParseInvalid(string text)
 {
     Assert.AreEqual(false, GenericTypeArgument.TryParseBracketedList(text, 0, 1, out _));
 }