public void StartMonitoring_HasSubscribers_ReturnsTrue() { //Arrannge: var fakeErrorHandler = Substitute.For <IErrorHandler>(); //Act: _uut.SubscribeErrorHandler(fakeErrorHandler); var result = _uut.StartMonitoring(); //Assert: Assert.That(result, Is.True); //Clean up: _uut.UnsubscribeErrorHandler(fakeErrorHandler); }
static void Main(string[] args) { RTDSImpl impl = new RTDSImpl(); impl.SubscribeErrorHandler(new ErrorHandler()); impl.StartMonitoring(); Console.ReadKey(); }