Ejemplo n.º 1
0
        public void ReportNoActivity()
        {
            // Define the report

            var report = new ResumeSearchActivityReport
            {
                ClientId             = _orgUnit.Id,
                SendToAccountManager = false,
                SendToClient         = true
            };

            _reportsCommand.CreateReport(report);

            // To client only and there's no activity, so no report.

            Execute(true);
            _emailServer.AssertNoEmailSent();

            // To client and AM, but no activity, so sent to AM only.

            report.SendToAccountManager = true;
            _reportsCommand.UpdateReport(report);

            Execute(true);

            var emails = _emailServer.AssertEmailsSent(1);

            emails[0].AssertSubject("No resume search activity for " + _orgUnit.FullName + " for " + ReportPeriodText);
            emails[0].AssertAddresses(Return, Return, _admin);
            emails[0].AssertAttachments(1);

            // Try again - no duplicate report should be sent.

            Execute(true);
            _emailServer.AssertNoEmailSent();
        }
Ejemplo n.º 2
0
 void IEmployerReportsCommand.UpdateReport(EmployerReport report)
 {
     _reportsCommand.UpdateReport(report);
 }