public void Can_Get_None_Silent_Sender()
        {
            var factory = new SenderFactory(new ExceptionReportInfo {
                SendMethod = ReportSendMethod.None
            }, _sendEvent);

            Assert.That(factory.Get(), Is.TypeOf <GhostSender>());
        }
Beispiel #2
0
        public Type Can_Determine_Sender(ReportSendMethod method)
        {
            var factory = new SenderFactory(new ExceptionReportInfo
            {
                SendMethod = method
            }, new Mock <IReportSendEvent>().Object);

            return(factory.Get().GetType());
        }
        public void Can_Get_WebService_Sender()
        {
            var factory = new SenderFactory(new ExceptionReportInfo
            {
                SendMethod = ReportSendMethod.WebService
            }, _sendEvent);

            Assert.That(factory.Get(), Is.TypeOf <WebServiceSender>());
        }
        public void Can_Get_SMTP_Sender()
        {
            var factory = new SenderFactory(new ExceptionReportInfo
            {
                SendMethod = ReportSendMethod.SMTP
            }, _sendEvent);

            Assert.That(factory.Get(), Is.TypeOf <SmtpMailSender>());
        }
        public void Can_Get_SimpleMAPI_Sender()
        {
            var factory = new SenderFactory(new ExceptionReportInfo
            {
                SendMethod = ReportSendMethod.SimpleMAPI
            }, _sendEvent);

            Assert.That(factory.Get(), Is.TypeOf <MapiMailSender>());
        }