Ejemplo n.º 1
0
        public void Pass_On_Valid_Tracking_Data()
        {
            var td = new TrackingData();
            _eht = new ErrorHandlerTracker(_mockTracker);

            Expect.Call(_mockTracker.GetTrackingData("Pass_On_Valid_Tracking_Data")).Return(td);

            _mocks.ReplayAll();

            Assert.AreEqual(td, _eht.GetTrackingData("Pass_On_Valid_Tracking_Data"));

            _mocks.VerifyAll();
        }
Ejemplo n.º 2
0
        public void Pass_On_Valid_Tracking_Data()
        {
            var td = new TrackingData();

            _eht = new ErrorHandlerTracker(_mockTracker);

            Expect.Call(_mockTracker.GetTrackingData("Pass_On_Valid_Tracking_Data")).Return(td);

            _mocks.ReplayAll();

            Assert.AreEqual(td, _eht.GetTrackingData("Pass_On_Valid_Tracking_Data"));

            _mocks.VerifyAll();
        }
Ejemplo n.º 3
0
        public void Suppress_Upstream_Exception()
        {
            var testException = new Exception("test");

            _eht = new ErrorHandlerTracker(_mockTracker);

            Expect.Call(_mockTracker.GetTrackingData("Suppress_Upstream_Exception")).Throw(testException);

            _mocks.ReplayAll();

            TrackingData td = _eht.GetTrackingData("Suppress_Upstream_Exception");
            Assert.AreEqual(true, td is ErrorTrackingData);
            Assert.AreEqual(testException, ((ErrorTrackingData) td).Exception);

            _mocks.VerifyAll();
        }
Ejemplo n.º 4
0
        public void Suppress_Upstream_Exception()
        {
            var testException = new Exception("test");

            _eht = new ErrorHandlerTracker(_mockTracker);

            Expect.Call(_mockTracker.GetTrackingData("Suppress_Upstream_Exception")).Throw(testException);

            _mocks.ReplayAll();

            TrackingData td = _eht.GetTrackingData("Suppress_Upstream_Exception");

            Assert.AreEqual(true, td is ErrorTrackingData);
            Assert.AreEqual(testException, ((ErrorTrackingData)td).Exception);

            _mocks.VerifyAll();
        }