Пример #1
0
        /// <summary>
        /// Constructs a new instance of <see cref="CommandLinePredictorTests" />
        /// </summary>
        public CommandLinePredictorTests(ModelFixture fixture)
        {
            this._fixture = fixture;
            var startHistory = $"{AzPredictorConstants.CommandPlaceholder}{AzPredictorConstants.CommandConcatenator}{AzPredictorConstants.CommandPlaceholder}";

            this._predictor = new CommandLinePredictor(this._fixture.PredictionCollection[startHistory], null);
        }
        /// <summary>
        /// Constructs a new instance of <see cref="CommandLinePredictorTests" />
        /// </summary>
        public CommandLinePredictorTests(ModelFixture fixture)
        {
            _fixture   = fixture;
            _azContext = new AzContext();
            var startHistory = $"{AzPredictorConstants.CommandPlaceholder}{AzPredictorConstants.CommandConcatenator}{AzPredictorConstants.CommandPlaceholder}";

            _predictor = new CommandLinePredictor(_fixture.PredictionCollection[startHistory], null, null, _azContext);
        }
Пример #3
0
        /// <summary>
        /// Constructs a new instance of <see cref="AzPredictorServiceTests"/>
        /// </summary>
        /// <param name="fixture"></param>
        public AzPredictorServiceTests(ModelFixture fixture)
        {
            this._fixture = fixture;
            var startHistory = $"{AzPredictorConstants.CommandPlaceholder}{AzPredictorConstants.CommandConcatenator}{AzPredictorConstants.CommandPlaceholder}";

            this._commandBasedPredictor = new CommandLinePredictor(this._fixture.PredictionCollection[startHistory], null);
            this._fallbackPredictor     = new CommandLinePredictor(this._fixture.CommandCollection, null);

            this._service = new MockAzPredictorService(startHistory, this._fixture.PredictionCollection[startHistory], this._fixture.CommandCollection);

            this._noFallbackPredictorService     = new MockAzPredictorService(startHistory, this._fixture.PredictionCollection[startHistory], null);
            this._noCommandBasedPredictorService = new MockAzPredictorService(null, null, this._fixture.CommandCollection);
            this._noPredictorService             = new MockAzPredictorService(null, null, null);
        }