public void ContextLovesExtensions() { var extension = MockRepository .GenerateMock<IContextExtension<StandardContext>>(); var ctx = new StandardContext(); ctx.AddExtension(extension); extension.AssertWasCalled( e => e.Attach(null), o => o.Constraints(Is.Equal(ctx))); }
public void ContextEnsuresLastDateWithExtension() { var extension = MockRepository .GenerateMock<IContextExtension<StandardContext>>(); var ctx = new StandardContext(); ctx.AddExtension(extension); ctx.Remove(extension); extension.AssertWasCalled( e => e.Remove(null), o => o.Constraints(Is.Equal(ctx))); }