protected override async Task <ExpandoObject> _RunTestAsync(ExpandoObject parameters, params Func <ExpandoObject, ExpandoObject>[] merge) { return(await TestHostAsync(parameters, async (p, m) => { var e = await base._RunTestAsync(parameters, merge); return e.AddOrMerge("langs", EMAIL.RunTests()); }, _LogError, merge)); }
public void LanguageRunTest() { AggregateException errors = new AggregateException(); var testResults = EMAIL.RunTests(exc => errors = exc); testResults.ForEach(tr => Console.WriteLine(tr.ToJson())); errors.InnerExceptions.ForEach(error => Console.WriteLine(error.ToMessages() + "\n\n")); Assert.AreEqual(4, errors.InnerExceptions.Count); ExceptionAssert.Propagates <AggregateException>(() => EMAIL.RunTests(), exc => { Assert.AreEqual(4, exc.InnerExceptions.Count); }); }
public IHttpActionResult RunTest() => Ok(EMAIL.RunTests());