예제 #1
0
        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);
        }
예제 #2
0
        static void Main(string[] args)
        {
            RTDSImpl impl = new RTDSImpl();

            impl.SubscribeErrorHandler(new ErrorHandler());
            impl.StartMonitoring();


            Console.ReadKey();
        }