Example #1
0
        public static void ResolveName(string name, string toResolve, bool ignoreCase, bool expected)
        {
            var cache = new DbObjectCache <Variable>();

            cache.SetObject(new Variable(name, PrimitiveTypes.Integer()));

            ObjectName resolved;

            Assert.Equal(expected, cache.TryResolveName(ObjectName.Parse(toResolve), ignoreCase, out resolved));
            Assert.Equal(expected, resolved != null);
        }
Example #2
0
        public static void SetAndGetObject()
        {
            var cache = new DbObjectCache <Variable>();

            cache.SetObject(new Variable("a", PrimitiveTypes.Integer()));

            Variable variable;

            Assert.True(cache.TryGetObject(new ObjectName("a"), out variable));
            Assert.NotNull(variable);
        }