public void TestSimpleIndexForMissingGuy() { var dict = new Dictionary <string, int>(); dict["hi"] = 5; var ir = new IndexerRefExpression(new ObjectValue(dict), new StringValue("hioi")); var c = new RootContext(); var r = ir.Evaluate(c); }
public void TestSimpleIndex() { var dict = new Dictionary <string, int>(); dict["hi"] = 5; var ir = new IndexerRefExpression(new ObjectValue(dict), new StringValue("hi")); var c = new RootContext(); var r = ir.Evaluate(c); Assert.IsNotNull(r, "result"); Assert.AreEqual(5, r, "the final result"); }