Exemplo n.º 1
0
 /// <inheritdoc/>
 public void Dispose()
 {
     if (_powerShellRuntime is not null)
     {
         _powerShellRuntime.Dispose();
         _powerShellRuntime = null;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Constructs a new instance of <see cref="CommandLinePredictorTests" />
        /// </summary>
        public CommandLinePredictorTests(ModelFixture fixture)
        {
            _fixture           = fixture;
            _powerShellRuntime = new MockPowerShellRuntime();
            _azContext         = new AzContext(_powerShellRuntime);
            var startHistory = $"{AzPredictorConstants.CommandPlaceholder}{AzPredictorConstants.CommandConcatenator}{AzPredictorConstants.CommandPlaceholder}";

            _predictor = new CommandLinePredictor(_fixture.PredictionCollection[startHistory], null, null, _azContext);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new instance of <see cref="ParameterSetTests" />.
 /// </summary>
 public ParameterSetTests()
 {
     _powerShellRuntime = new MockPowerShellRuntime();
     _azContext         = new AzContext(_powerShellRuntime);
 }