From c03afbd4fbabb26d7720785b9bc4e24a69c66d99 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Tue, 30 Jul 2024 11:39:33 +0700 Subject: [PATCH] replace RhinoMocks with Moq using RhinoMocksToMoq migration package. --- .../DomainServices/DataStoreInitializationServicesTests.cs | 4 +++- tests/SIL.LCModel.Tests/SIL.LCModel.Tests.csproj | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/SIL.LCModel.Tests/DomainServices/DataStoreInitializationServicesTests.cs b/tests/SIL.LCModel.Tests/DomainServices/DataStoreInitializationServicesTests.cs index 47e31455..bf6f85a8 100644 --- a/tests/SIL.LCModel.Tests/DomainServices/DataStoreInitializationServicesTests.cs +++ b/tests/SIL.LCModel.Tests/DomainServices/DataStoreInitializationServicesTests.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Moq; using NUnit.Framework; using Rhino.Mocks; using SIL.LCModel.Core.KernelInterfaces; @@ -12,6 +13,7 @@ using SIL.LCModel.Core.Text; using SIL.LCModel.DomainImpl; using SIL.LCModel.Utils; +using MockRepository = Rhino.Mocks.MockRepository; namespace SIL.LCModel.DomainServices { @@ -320,7 +322,7 @@ public override void TestSetup() GetBtDelegate getBtDelegate = () => m_para.TranslationsOC.FirstOrDefault(trans => trans.TypeRA != null && trans.TypeRA.Guid == CmPossibilityTags.kguidTranBackTranslation); - m_para.Stub(p => p.GetBT()).Do(getBtDelegate); + Mock.Get(m_para).Setup(p => p.GetBT()).Returns(getBtDelegate); } #endregion diff --git a/tests/SIL.LCModel.Tests/SIL.LCModel.Tests.csproj b/tests/SIL.LCModel.Tests/SIL.LCModel.Tests.csproj index f7045720..f2d09b43 100644 --- a/tests/SIL.LCModel.Tests/SIL.LCModel.Tests.csproj +++ b/tests/SIL.LCModel.Tests/SIL.LCModel.Tests.csproj @@ -14,7 +14,7 @@ This package provides unit tests for SIL.LCModel. - +