Esempio n. 1
0
        public void TestStopAuditing()
        {
            MockTraceClient client = new MockTraceClient();

            using (MockTraceAuditHelper mockHelper = new MockTraceAuditHelper(client))
            {
                MockEmailScanner scanner = (MockEmailScanner)mockHelper.EmailScanner;

                Assert.IsFalse(scanner.CancelCalled);

                mockHelper.Audit();
                mockHelper.StopAuditing();

                Assert.IsTrue(scanner.CancelCalled);
            }
        }
Esempio n. 2
0
        public void TestCallsBackToQueryOptions()
        {
            MockTraceClient client = new MockTraceClient();

            using (MockTraceAuditHelper helper = new MockTraceAuditHelper(client))
            {

                Assert.IsFalse(client.CallbackQueryOptions);

                helper.Audit();

                Assert.IsTrue(client.CallbackQueryOptions);
            }
        }
Esempio n. 3
0
        public void TestStartAuditingCallsBeginOnEmailScanner()
        {
            MockTraceClient client = new MockTraceClient();

            using (MockTraceAuditHelper mockHelper = new MockTraceAuditHelper(client))
            {
                MockEmailScanner scanner = (MockEmailScanner)mockHelper.EmailScanner;

                Assert.IsFalse(scanner.BeginCalled);
                Assert.IsFalse(client.CallbackNotifyFinished);

                mockHelper.Audit(); 

                Assert.IsTrue(scanner.BeginCalled);
                Assert.IsTrue(client.CallbackNotifyFinished);
            }
        }
Esempio n. 4
0
        public void TestConstructorWithITraceClient()
        {
            MockTraceClient client = new MockTraceClient();

            TraceAuditManager helper = new TraceAuditManager(client);
        }