///<summary>Perform the given action as a Middle Tier client using OpenDentalServerMockIIS.</summary> public static void RunMiddleTierMock(Action a) { RemotingRole remotingRolePrevious = RemotingClient.RemotingRole; OpenDentBusiness.WebServices.OpenDentalServerMockIIS mockPrevious = OpenDentBusiness.WebServices.OpenDentalServerProxy.MockOpenDentalServerCur; if (mockPrevious == null) { OpenDentBusiness.WebServices.OpenDentalServerProxy.MockOpenDentalServerCur = new OpenDentBusiness.WebServices.OpenDentalServerMockIIS(); } RemotingClient.RemotingRole = RemotingRole.ClientWeb; try { a(); } finally { OpenDentBusiness.WebServices.OpenDentalServerProxy.MockOpenDentalServerCur = mockPrevious; RemotingClient.RemotingRole = remotingRolePrevious; } }
protected static void RunTestsAgainstMiddleTier(OpenDentBusiness.WebServices.OpenDentalServerMockIIS mockServer) { RemotingClient.RemotingRole = RemotingRole.ClientWeb; OpenDentBusiness.WebServices.OpenDentalServerProxy.MockOpenDentalServerCur = mockServer; }