main
zggsong 2 weeks ago
parent 2bd364c36c
commit 689b642f8e

@ -4,7 +4,7 @@ using System.Text.Json.Nodes;
namespace STranslateDLL; namespace STranslateDLL;
public static class Program public static class LocalMode
{ {
public static async Task<string> ExecuteAsync( public static async Task<string> ExecuteAsync(
string content, string content,

@ -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)
Loading…
Cancel
Save