예제 #1
0
 public void OneTimeSetUp()
 {
     _logger         = new Logger();
     _variableParser = new VariableParser(_logger);
     _stringParser   = new StringParser(_logger);
     _termParser     = new TermParser(_variableParser, _logger);
     _termConverter  = new TermConverter(_logger);
 }
 public SpfRecordParser(
     ISpfVersionParser versionParser,
     ITermParser termParser,
     IEvaluator <DomainSpfRecord> spfRecordRulesEvaluator,
     IImplicitProvider <Term> implicitTermProvider)
 {
     _versionParser           = versionParser;
     _termParser              = termParser;
     _spfRecordRulesEvaluator = spfRecordRulesEvaluator;
     _implicitTermProvider    = implicitTermProvider;
 }
예제 #3
0
 public Calculator(
     IStringParser stringParser,
     ITermParser termParser,
     ITermConverter termConverter,
     ILogger logger)
 {
     _stringParser  = stringParser;
     _termParser    = termParser;
     _termConverter = termConverter;
     _logger        = logger;
     _comparer      = new TermEqualityComparer();
 }
예제 #4
0
        public void OneTimeSetUp()
        {
            _logger = Substitute.For <ILogger>();

            _stringParser = Substitute.For <IStringParser>();
            _stringParser.Parse(Arg.Any <string>())
            .Returns(new[] { FakeValidString, FakeValidString });

            _termParser = Substitute.For <ITermParser>();
            _termParser.Parse(Arg.Any <string>())
            .Returns(FakeValidTerm);

            _termConverter = Substitute.For <ITermConverter>();
            _termConverter.ToCanonical(Arg.Any <Term>())
            .Returns(FakeValidString);
        }