public void ValidDollarReferencePatternTest(string key, int pathIndex, int keyGroup, string canonicalForm) { IPathAndGroupReference amp = new DollarReference("$" + key); amp.GetPathIndex().Should().Be(pathIndex); amp.GetKeyGroup().Should().Be(keyGroup); amp.GetCanonicalForm().Should().Be($"${canonicalForm}"); }
public virtual string Evaluate(WalkedPath walkedPath) { MatchedElement pe = walkedPath.ElementFromEnd(_dRef.GetPathIndex()).MatchedElement; return(pe.GetSubKeyRef(_dRef.GetKeyGroup())); }