public void EntityProcessorsNotFiredWhenNotTEntity_Any() { EntityMapping.RegisterType(typeof(MongoFrameworkQueryableModel)); var connection = TestConfiguration.GetConnection(); var context = new MongoDbContext(connection); var provider = new MongoFrameworkQueryProvider <MongoFrameworkQueryableModel>(connection); var queryable = new MongoFrameworkQueryable <MongoFrameworkQueryableModel>(provider); var processor = new TestProcessor <MongoFrameworkQueryableModel>(); provider.EntityProcessors.Add(processor); context.ChangeTracker.SetEntityState(new MongoFrameworkQueryableModel { Title = "EntityProcessorsNotFiredWhenNotTEntity_Any" }, EntityEntryState.Added); context.SaveChanges(); var result = queryable.Any(e => e.Title == "EntityProcessorsNotFiredWhenNotTEntity_Any"); Assert.IsTrue(result); Assert.IsFalse(processor.EntityProcessed); }