Ejemplo n.º 1
0
        public void AsNoTracking_on_IQueryable_with_no_AsNoTracking_method_does_nothing()
        {
            var mockQueryable     = new Mock <IQueryable <FakeEntity> >().Object;
            var afterAsNoTracking = mockQueryable.AsNoTracking();

            Assert.Same(mockQueryable, afterAsNoTracking);
        }
Ejemplo n.º 2
0
        public void AsNoTracking_on_IQueryable_with_non_matching_AsNoTracking_is_ignored()
        {
            IQueryable <FakeEntity> source = new Mock <INoTrackingableWithFunnyAsNoTracking <FakeEntity> >(MockBehavior.Strict).Object;

            var afterAsNoTracking = source.AsNoTracking();

            Assert.Same(source, afterAsNoTracking);
        }
Ejemplo n.º 3
0
        public void Non_generic_AsNoTracking_on_IQueryable_with_AsNoTracking_returning_string_is_ignored()
        {
            IQueryable source = new Mock <INoTrackingableReturningString>(MockBehavior.Strict).Object;

            var afterAsNoTracking = source.AsNoTracking();

            Assert.Same(source, afterAsNoTracking);
        }