public async Task AllRulePassNoErrors() { HostCertificates hostCertificates = A.Fake <HostCertificates>(); A.CallTo(() => _rule1.Evaluate(hostCertificates)).Returns(new List <EvaluationError>()); A.CallTo(() => _rule2.Evaluate(hostCertificates)).Returns(new List <EvaluationError>()); EvaluationResult <HostCertificates> evaluationResult = await _evaluator.Evaluate(hostCertificates); Assert.That(evaluationResult.Errors, Is.Empty); }
public void Evaluate_CertificateWithoutPassword_Success() { var evaluator = new CertificateEvaluator(); var span = new Span <char>(@"D:\\cert.p12".ToCharArray()); var convertResult = new ConvertResult <CurlOptions> { Data = new CurlOptions() }; evaluator.Evaluate(ref span, convertResult); Assert.Equal("D:\\cert.p12", convertResult.Data.CertificateFileName); Assert.Null(convertResult.Data.CertificatePassword); }