public void TestStandardTypeLocator() { var tl = new StandardTypeLocator(); var prefixes = tl.ImportPrefixes; Assert.Single(prefixes); tl.RegisterImport("System.Collections"); prefixes = tl.ImportPrefixes; Assert.Equal(2, prefixes.Count); tl.RemoveImport("System.Collections"); prefixes = tl.ImportPrefixes; Assert.Single(prefixes); }
public void TestStandardEvaluationContext() { var context = new StandardEvaluationContext(); Assert.NotNull(context.TypeComparator); var tc = new StandardTypeComparator(); context.TypeComparator = tc; Assert.Equal(tc, context.TypeComparator); var tl = new StandardTypeLocator(); context.TypeLocator = tl; Assert.Equal(tl, context.TypeLocator); }