Пример #1
0
 public void HandleError()
 {
     FakeErrorSocket fakeSocket = new FakeErrorSocket();
     fakeSocket.ErrorOnConnect = true;
     tracker = new Tracker(file, fakeSocket);
     bool errorReceived = false;
     tracker.Error += delegate(object sender, Exception se)
         {
             errorReceived = true;
             Assert.IsNotNull(se);
         };
     tracker.Start();
     Assert.IsTrue(errorReceived);
 }
Пример #2
0
        public void HandleError()
        {
            FakeErrorSocket fakeSocket = new FakeErrorSocket();

            fakeSocket.ErrorOnConnect = true;
            tracker = new Tracker(file, fakeSocket);
            bool errorReceived = false;

            tracker.Error += delegate(object sender, Exception se)
            {
                errorReceived = true;
                Assert.IsNotNull(se);
            };
            tracker.Start();
            Assert.IsTrue(errorReceived);
        }