Ejemplo 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);
            }
        }
Ejemplo 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);
            }
        }
Ejemplo 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);
            }
        }
Ejemplo n.º 4
0
        public void TestConstructorWithITraceClient()
        {
            MockTraceClient client = new MockTraceClient();

            TraceAuditManager helper = new TraceAuditManager(client);
        }