public void When_not_any_conflict_registered_then_returns_true()
        {
            var sut = new DefaultConcurrencyConflictResolver();
            var result = sut.ConflictsWith(typeof(FakeEvent1), new[]
            {
                typeof(FakeEvent1),
                typeof(FakeEvent2)
            });

            Assert.True(result);
        }
        public void With_not_registered_conflict_returns_false()
        {
            var sut = new DefaultConcurrencyConflictResolver();
            sut.RegisterConflicts(typeof(FakeEvent1), typeof(FakeEvent2));

            var result = sut.ConflictsWith(typeof(FakeEvent1), new[]
            {
                typeof(FakeEvent1)
            });

            Assert.False(result);
        }
Esempio n. 3
0
        public SaveChangesWithResolver(LocalDbFixture fixture) : base(fixture)
        {
            _resolver = new DefaultConcurrencyConflictResolver();

            _resolver.RegisterConflicts(typeof(FakeEvent1), typeof(FakeEvent2));
        }