public ExampleApiPerformanceSteps(IReportDataGeneration reportDataGeneration, IExampleRestApiClient exampleRestApiClient) { this.reportDataGeneration = reportDataGeneration ?? throw new ArgumentNullException(nameof(reportDataGeneration)); this.exampleRestApiClient = exampleRestApiClient ?? throw new ArgumentNullException(nameof(exampleRestApiClient)); performanceActionList = new PerformanceActionList(); }
public void GeneratePerformanceJsonReport(PerformanceActionList performanceActionList) { using (var file = File.CreateText($"{this.testPerformancePath}{Path.DirectorySeparatorChar}{performanceActionList.Filename}.json")) { var stringJson = JsonSerializer.Serialize(performanceActionList); file.Write(stringJson); } }