Esempio n. 1
0
        public void DetachRemovesItemsFromLocalCollection()
        {
            var sut = new StubDbSet <TestEntity>();

            var e = new TestEntity();

            sut.Add(e);

            Assert.Same(e, sut.Local[0]);

            sut.Detach(e);

            Assert.Empty(sut.Local);
        }
Esempio n. 2
0
        public void DetachRemovesItemsFromLocalCollection()
        {
            var sut = new StubDbSet<TestEntity>();

            var e = new TestEntity();

            sut.Add(e);

            Assert.Same(e, sut.Local[0]);

            sut.Detach(e);

            Assert.Empty(sut.Local);
        }