public void DmarcRecordProcessorCorrectedCreated()
        {
            Environment.SetEnvironmentVariable("DnsRecordLimit", "50");
            Environment.SetEnvironmentVariable("AWS_ACCESS_KEY_ID", "50");
            Environment.SetEnvironmentVariable("AWS_SECRET_ACCESS_KEY", "50");
            Environment.SetEnvironmentVariable("AWS_SESSION_TOKEN", "50");
            Environment.SetEnvironmentVariable("RefreshIntervalSeconds", "50");
            Environment.SetEnvironmentVariable("FailureRefreshIntervalSeconds", "50");
            Environment.SetEnvironmentVariable("RemainingTimeThresholdSeconds", "50");
            Environment.SetEnvironmentVariable("SnsTopicArn", "http://test.topic");
            Environment.SetEnvironmentVariable("ConnectionString", "ConnectionString");

            IDnsRecordProcessor recordProcessor = DmarcRecordProcessorFactory.Create(A.Fake <ILogger>());

            Assert.That(recordProcessor, Is.Not.Null);
        }
Пример #2
0
        public static void Main(string[] args)
        {
            CommandLineApplication commandLineApplication = new CommandLineApplication();

            commandLineApplication.Name = "DnsRecordEvaluator";

            commandLineApplication.Command("DMARC", command =>
            {
                command.Description = "DMARC Record Evaluator";

                command.OnExecute(() =>
                {
                    Console.WriteLine("Running in DMARC Mode.");

                    IDmarcRecordProcessor dmarcRecordProcessor = DmarcRecordProcessorFactory.Create();
                    dmarcRecordProcessor.Run().Wait();

                    return(0);
                });
            }, false);

            commandLineApplication.Command("SPF", command =>
            {
                command.Description = "SPF Record Evaluator";

                command.OnExecute(() =>
                {
                    Console.WriteLine("Running in SPF Mode.");

                    ISpfRecordProcessor spfRecordProcessor = SpfRecordProcessorFactory.Create();
                    spfRecordProcessor.Run().Wait();

                    return(0);
                });
            }, false);

            commandLineApplication.Execute(args);
        }