var process = new Process
{
StartInfo = psi
};
process.OutputDataReceived += (sender, args) => Display(args.Data);
process.ErrorDataReceived += (sender, args) => Display(args.Data);
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
var exited = process.WaitForExit(0);
#region License
// // Разработано: Коротенко Владимиром Николаевичем (Vladimir N. Korotenko)
// // email: koroten@ya.ru
// // skype:vladimir-korotenko
// // https://vkorotenko.ru
// // Создано: 26.04.2020 10:26
#endregion
using Newtonsoft.Json;
using SpecialForcesDirectory.Code;
using System.Threading.Tasks;
using SpecialForcesDirectory.Dbl;
using Xunit;
namespace SpecialForcesDirectory.Test
{
public class LocalizationResourceTests
{
[Fact]
public async Task GetRussianQuotePageTest()
{
var url = "https://test.ru/offlineapp/quotaservice.php";
await GetData(url);
}
private async Task<Quote[]> GetData(string url)
{
var da = new LoadDataAdapter();
var json = await da.GetJson(url);
return JsonConvert.DeserializeObject<Quote[]>(json, new JsonBooleanConverter());
}
[Fact]
public async Task GetEnglishQuotePageTest()
{
var url = "https://en.test.ru/offlineapp/quotaservice.php";
await GetData(url);
}
}
}