using CAPI.Custom.Services; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using System.IO; namespace CEP.ConsoleTests.Quotes { public class TestQuoteInMemoryProcessing : IConsoleTest { public TestResult RunTest() { var methodName = MethodBase.GetCurrentMethod().DeclaringType.Name; Console.WriteLine($"Executing: {methodName} ..."); StringBuilder output = new StringBuilder($"# {methodName}").AppendLine(); var processor = new QuoteProcessor(); var quoteId = 16893645; var quote = processor.ProcessInMemory(quoteId); var jsonData = JsonConvert.SerializeObject(quote, Formatting.Indented); File.WriteAllText("processedQuote.json", jsonData); return new TestResult { Name = methodName, Output = jsonData }; } } }