Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4147fd0

Browse files
committed
Fix Test
1 parent ee89b56 commit 4147fd0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/ST.Client.UnitTest/HostsFileTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ public static void DeleteAllTempFileName()
2828
static void Test(string[] hosts, Action<IHostsFileService> action)
2929
=> Test(hosts, (_, s, _) => action(s));
3030

31-
static void Test(string[] hosts, Action<string[], IHostsFileService, IDesktopPlatformService> action)
31+
static void Test(string[] hosts, Action<string[], IHostsFileService, IPlatformService> action)
3232
{
3333
var tempFileName = Path.GetTempFileName();
3434
tempFileNames.Add(tempFileName);
3535
IOPath.FileIfExistsItDelete(tempFileName);
3636
File.WriteAllLines(tempFileName, hosts);
37-
var mock_dps = new Mock<IDesktopPlatformService>();
37+
var mock_dps = new Mock<IPlatformService>();
3838
mock_dps.Setup(x => x.HostsFilePath).Returns(tempFileName);
3939
mock_dps.Setup(x => x.Default).Returns(DefaultEncoding);
40-
IDesktopPlatformService dps = mock_dps.Object;
40+
IPlatformService dps = mock_dps.Object;
4141
IHostsFileService s = new HostsFileServiceImpl(dps);
4242
action(hosts, s, dps);
4343
File.Delete(tempFileName);

tests/ST.Client.UnitTest/SetupFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static void ConfigureServices(IServiceCollection services)
8181
// 业务平台用户管理
8282
services.TryAddUserManager();
8383

84-
services.TryAddDesktopHttpPlatformHelper();
84+
services.TryAddClientHttpPlatformHelperService();
8585

8686
// 服务端API调用
8787
services.TryAddCloudServiceClient<CloudServiceClient>(c =>

0 commit comments

Comments
 (0)