public void ShouldNotInvokeHookAction_IfNotAcceptableEntityState(EntityState acceptableState, EntityState entityState) { var entry = SetupDbEntityEntry(new FooEntityStub(), entityState); var hook = new DbHook <FooEntityStub>(stub => Assert.Fail("Hook invoked"), acceptableState); hook.HookEntry(entry); Assert.Pass("Hook not invoked"); }
public void ShouldNotInvokeHookAction_IfNotAcceptableEntityType() { var entry = SetupDbEntityEntry(new object(), EntityState.Unchanged); var hook = new DbHook <FooEntityStub>(stub => Assert.Fail("Hook invoked")); hook.HookEntry(entry); Assert.Pass("Hook not invoked"); }