diff --git a/test/SIL.XForge.Scripture.Tests/Services/MachineProjectServiceTests.cs b/test/SIL.XForge.Scripture.Tests/Services/MachineProjectServiceTests.cs index a8fdf6fe65..f57b763196 100644 --- a/test/SIL.XForge.Scripture.Tests/Services/MachineProjectServiceTests.cs +++ b/test/SIL.XForge.Scripture.Tests/Services/MachineProjectServiceTests.cs @@ -869,7 +869,7 @@ public async Task EnsureTranslationEngineExistsAsync_ProjectDeletedBeforeExecuti CancellationToken.None ) ); - env.ParatextService.DidNotReceiveWithAnyArgs().GetLanguageId(Arg.Any(), Arg.Any()); + env.ParatextService.DidNotReceiveWithAnyArgs().GetWritingSystem(Arg.Any(), Arg.Any()); } [Test] @@ -889,8 +889,8 @@ public async Task EnsureTranslationEngineExistsAsync_ProjectDeletedDuringExecuti SFProjectSecret projectSecret = env.ProjectSecrets.Get(Project03); // Delete the project mid-sync (normally this would be done out of process) - env.ParatextService.GetLanguageId(Arg.Any(), Arg.Any()) - .Returns(string.Empty) + env.ParatextService.GetWritingSystem(Arg.Any(), Arg.Any()) + .Returns(new WritingSystem()) .AndDoes(_ => projectDoc.DeleteAsync()); // SUT @@ -904,7 +904,7 @@ public async Task EnsureTranslationEngineExistsAsync_ProjectDeletedDuringExecuti CancellationToken.None ) ); - env.ParatextService.Received(1).GetLanguageId(Arg.Any(), Arg.Any()); + env.ParatextService.Received(1).GetWritingSystem(Arg.Any(), Arg.Any()); } [Test] @@ -951,8 +951,10 @@ public async Task EnsureTranslationEngineExistsAsync_SetsUpTheProjectAndTranslat env.Service.Configure() .CreateServalProjectAsync(Arg.Any(), preTranslate: true, CancellationToken.None) .Returns(Task.FromResult(TranslationEngine02)); - env.ParatextService.GetLanguageId(Arg.Any(), Paratext01).Returns(sourceLanguage); - env.ParatextService.GetLanguageId(Arg.Any(), Paratext03).Returns(targetLanguage); + env.ParatextService.GetWritingSystem(Arg.Any(), Paratext01) + .Returns(new WritingSystem { Tag = sourceLanguage }); + env.ParatextService.GetWritingSystem(Arg.Any(), Paratext03) + .Returns(new WritingSystem { Tag = targetLanguage }); // Retrieve required objects await using IConnection connection = await env.RealtimeService.ConnectAsync(); @@ -988,8 +990,10 @@ public async Task EnsureTranslationEngineExistsAsync_SetsUpTheProjectAndTranslat env.Service.Configure() .CreateServalProjectAsync(Arg.Any(), preTranslate: false, CancellationToken.None) .Returns(Task.FromResult(TranslationEngine02)); - env.ParatextService.GetLanguageId(Arg.Any(), Paratext01).Returns(sourceLanguage); - env.ParatextService.GetLanguageId(Arg.Any(), Paratext03).Returns(targetLanguage); + env.ParatextService.GetWritingSystem(Arg.Any(), Paratext01) + .Returns(new WritingSystem { Tag = sourceLanguage }); + env.ParatextService.GetWritingSystem(Arg.Any(), Paratext03) + .Returns(new WritingSystem { Tag = targetLanguage }); // Retrieve required objects await using IConnection connection = await env.RealtimeService.ConnectAsync(); @@ -1069,7 +1073,7 @@ public async Task EnsureTranslationEngineExistsAsync_TranslationEngineCouldNotBe CancellationToken.None ) ); - env.ParatextService.DidNotReceiveWithAnyArgs().GetLanguageId(Arg.Any(), Arg.Any()); + env.ParatextService.DidNotReceiveWithAnyArgs().GetWritingSystem(Arg.Any(), Arg.Any()); } [Test]