Пример #1
0
        public void Proxies_correct_interfaces_for_ChangingAndChangedNotifications()
        {
            using var context = new ProxyGenerationContext(ChangeTrackingStrategy.ChangingAndChangedNotifications);
            var proxy     = context.CreateProxy <ChangeValueEntity>();
            var proxyType = proxy.GetType();

            Assert.True(changeInterface.IsAssignableFrom(proxyType));
            Assert.True(changingInterface.IsAssignableFrom(proxyType));
        }
Пример #2
0
        public void Proxies_correct_interfaces_for_Snapshot()
        {
            using var context = new ProxyGenerationContext(ChangeTrackingStrategy.Snapshot);
            var proxy     = context.CreateProxy <ChangeValueEntity>();
            var proxyType = proxy.GetType();

            Assert.False(changeInterface.IsAssignableFrom(proxyType));
            Assert.False(changingInterface.IsAssignableFrom(proxyType));
        }