|
|
@ -5,7 +5,7 @@ using Xunit.Abstractions;
|
|
|
|
|
|
|
|
|
|
|
|
namespace STranslateDLLTests;
|
|
|
|
namespace STranslateDLLTests;
|
|
|
|
|
|
|
|
|
|
|
|
public class ProgramTests(ITestOutputHelper testOutputHelper)
|
|
|
|
public class LocalModeTests(ITestOutputHelper testOutputHelper)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
[Fact()]
|
|
|
|
[Fact()]
|
|
|
|
public async Task ExecuteAsyncTestAsync()
|
|
|
|
public async Task ExecuteAsyncTestAsync()
|
|
|
@ -13,7 +13,7 @@ public class ProgramTests(ITestOutputHelper testOutputHelper)
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var cts = new CancellationTokenSource();
|
|
|
|
var cts = new CancellationTokenSource();
|
|
|
|
var ret = await Program.ExecuteAsync("Hello World", "auto", "ZH", cts.Token);
|
|
|
|
var ret = await LocalMode.ExecuteAsync("Hello World", "auto", "ZH", cts.Token);
|
|
|
|
testOutputHelper.WriteLine(ret);
|
|
|
|
testOutputHelper.WriteLine(ret);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|