using System.Collections.Generic; using Upsilon.Evaluator; using Xunit; namespace UpsilonTests { public class UserDataDictionaryTests { [Fact] public void BasicStringKeyed() { var arr = new Dictionary { {"test", 100}, {"1234", 90}, {"here", 1683}, }; const string input = @" function getValue(arr) return arr[""here""] end "; var script = new Script(input); Assert.Empty(script.Diagnostics.Messages); var evaluated = script.EvaluateFunction("getValue", new[] {arr}); Assert.Empty(script.Diagnostics.Messages); Assert.Equal(1683, evaluated); } } }