public void StatusDeterminedByMessages(Status expectedStatus, MessageType[] messageTypes)
        {
            List <Message> messages = messageTypes?.Select(CreateMessage).ToList();

            Status result = _domainStatusEvaluator.GetStatus(null, messages);

            Assert.AreEqual(result, expectedStatus);
        }
Example #2
0
        public void ShouldDetermineCorrectStatus(Status expectedStatus, ErrorType[] certificateErrors, EvaluatorResult[] evaluatorResults)
        {
            List <TlsEvaluatedResult> tlsEvaluatedResults = evaluatorResults?.Select(x => new TlsEvaluatedResult(Guid.Empty, x)).ToList();
            List <Error> errors = certificateErrors?.Select(x => new Error(x, string.Empty)).ToList();

            var result = _domainStatusEvaluator.GetStatus(tlsEvaluatedResults, errors);

            Assert.AreEqual(expectedStatus, result);
        }