Rhino Mock throws an exception when raising an event
问题 Is it possible to simulate an event using Rhino Mocks framework without getting the exception below? A first chance exception of type 'System.NotSupportedException' occurred in Rhino.Mocks.dll - Can't create mocks of sealed classes public interface IWithEvent { event EventHandler RaiseMeWithoutExceptionPlease; } [TestClass] public class MockedEvents { [TestMethod] public void EventsTest() { IWithEvent withEvent = MockRepository.GenerateStub<IWithEvent>(); for (int i = 0; i < 500; i++) { //