protected void SetUp()
 {
     mocks                  = new Mockery();
     mockMessageFile        = mocks.NewMock <IFile>();
     mockFileSystem         = mocks.NewMock <IFileSystem>();
     testFileRemoteReceiver = new FileRemoteReceiver(messageFilePath, lockFilePath, 1000, new ConsoleApplicationLogger(LogLevel.Warning, '|', "  "), new NullMetricLogger(), mockMessageFile, mockFileSystem);
 }
 protected void SetUp()
 {
     mocks                  = new Mockery();
     mockMessageFile        = mocks.NewMock <IFile>();
     mockFileSystem         = mocks.NewMock <IFileSystem>();
     mockApplicationLogger  = mocks.NewMock <IApplicationLogger>();
     testFileRemoteReceiver = new FileRemoteReceiver(messageFilePath, lockFilePath, 1000, mockApplicationLogger, new NullMetricLogger(), mockMessageFile, mockFileSystem);
 }
        //------------------------------------------------------------------------------
        //
        // Method: MainViewRemoteAdapterFile (constructor)
        //
        //------------------------------------------------------------------------------
        /// <summary>
        /// Initialises a new instance of the SampleApplication2.MainViewRemoteAdapterFile class.
        /// </summary>
        /// <param name="outgoingRequestFilePath">The full path of the file to use for outgoing method invocation requests (i.e. calls).</param>
        /// <param name="outgoingRequestLockPath">The full path of the lock file to use for outgoing method invocation requests (i.e. calls).</param>
        /// <param name="outgoingResponseFilePath">The full path of the file to use for outgoing method invocation responses (i.e. return values).</param>
        /// <param name="outgoingResponseLockPath">The full path of the lock file to use for outgoing method invocation responses (i.e. return values).</param>
        /// <param name="incomingResponseFilePath">The full path of the file to use for incoming method invocation responses (i.e. return values).</param>
        /// <param name="incomingResponseLockPath">The full path of the lock file to use for incoming method invocation responses (i.e. return values).</param>
        /// <param name="incomingRequestFilePath">The full path of the file to use for incoming method invocation requests (i.e. calls).</param>
        /// <param name="incomingRequestLockPath">The full path of the lock file to use for incoming method invocation requests (i.e. calls).</param>
        public MainViewRemoteAdapterFile(string outgoingRequestFilePath, string outgoingRequestLockPath, string outgoingResponseFilePath, string outgoingResponseLockPath, string incomingResponseFilePath, string incomingResponseLockPath, string incomingRequestFilePath, string incomingRequestLockPath)
        {
            // Setup objects for sending method invocations
            outgoingMethodSerializer = new MethodInvocationSerializer(new SerializerOperationMap());
            outgoingSender           = new FileRemoteSender(outgoingRequestFilePath, outgoingRequestLockPath);
            outgoingReceiver         = new FileRemoteReceiver(outgoingResponseFilePath, outgoingResponseLockPath, 200);
            methodInvocationSender   = new MethodInvocationRemoteSender(outgoingMethodSerializer, outgoingSender, outgoingReceiver);

            // Setup objects for receiving method invocations
            incomingMethodSerializer = new MethodInvocationSerializer(new SerializerOperationMap());
            incomingSender           = new FileRemoteSender(incomingResponseFilePath, incomingResponseLockPath);
            incomingReceiver         = new FileRemoteReceiver(incomingRequestFilePath, incomingRequestLockPath, 200);
            methodInvocationReceiver = new MethodInvocationRemoteReceiver(incomingMethodSerializer, incomingSender, incomingReceiver);
            // Hook the 'MethodInvocationReceived' event on the receiver up to the local method which handles recieving method invocations
            methodInvocationReceiver.MethodInvocationReceived += new MethodInvocationReceivedEventHandler(ReceiveMethodInvocation);
        }