Beispiel #1
0
        public void UpdatesEmptyRecordEvaluationMessages()
        {
            DkimSelector selector1 = CreateSelector(Selector1, CreateRecord(Dkim1, new Message(Guid.NewGuid(), "oh boy!", string.Empty, MessageType.Warning)));

            DkimEntityState state = CreateState(Domain, DkimState.PollPending, selector1);

            DkimSelector selector2 = CreateSelector(Selector1, CreateRecordWithEmptyList(Dkim1));

            state.UpdateRecords(new List <DkimSelector> {
                selector2
            }, DateTime.UtcNow);

            DkimEvaluationUpdated evaluationUpdated = state.UpdateEvaluations(DateTime.UtcNow);

            Assert.AreEqual(evaluationUpdated.DkimEvaluationResults[0].Records[0].EvaluationMessages.Count, 0);
        }
Beispiel #2
0
        public void UpdatesWithNoChangesRecordEvaluationMessages()
        {
            DkimSelector selector1 = CreateSelector(Selector1, CreateRecord(Dkim1));

            DkimEntityState state = CreateState(Domain, DkimState.PollPending, selector1);

            DkimSelector selector2 = CreateSelector(Selector1, CreateRecord(Dkim1));

            state.UpdateRecords(new List <DkimSelector> {
                selector2
            }, DateTime.UtcNow);

            DkimEvaluationUpdated evaluationUpdated = state.UpdateEvaluations(DateTime.UtcNow);

            Assert.That(evaluationUpdated, Is.Not.Null);
        }