示例#1
0
        public void OverrideChildContext_ValueType_ReturnsNewValue()
        {
            var collection = new MappingCollection <object, object, bool>(null);

            collection.SetChildContext((from, to, context) =>
            {
                Assert.IsTrue(context);
                return(false);
            });
            Assert.IsFalse(collection.ContextUpdater(null, null, true));
        }
示例#2
0
        public void OverrideChildContext_ClassType_InvokesClone()
        {
            var testContext = new CloneableTestContext();

            _collection.SetChildContext((from, to, context) =>
            {
                Assert.AreNotSame(testContext, context);
                return(context);
            });
            _collection.ContextUpdater(null, null, testContext);
        }