/// <inheritdoc/> public void Dispose() { if (_powerShellRuntime is not null) { _powerShellRuntime.Dispose(); _powerShellRuntime = null; } }
/// <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); }
/// <summary> /// Creates a new instance of <see cref="ParameterSetTests" />. /// </summary> public ParameterSetTests() { _powerShellRuntime = new MockPowerShellRuntime(); _azContext = new AzContext(_powerShellRuntime); }