private void DoTest(string expectedErrorMessagePart)
        {
            string pipeId            = Guid.NewGuid().ToString();
            int    debuggeeProcessId = 2017;

            // ReSharper disable once UnusedVariable
            var host = new DebuggerAttacherServiceHost(pipeId, MockDebuggerAttacher.Object, MockLogger.Object);

            try
            {
                host.Open();

                var proxy = DebuggerAttacherServiceConfiguration.CreateProxy(pipeId, WaitingTime);
                using (var client = new DebuggerAttacherServiceProxyWrapper(proxy))
                {
                    client.Should().NotBeNull();
                    client.Service.Should().NotBeNull();

                    Action attaching = () => client.Service.AttachDebugger(debuggeeProcessId);
                    if (expectedErrorMessagePart == null)
                    {
                        attaching.ShouldNotThrow();
                    }
                    else
                    {
                        attaching.ShouldThrow <FaultException <DebuggerAttacherServiceFault> >().Where(
                            (FaultException <DebuggerAttacherServiceFault> ex) => ex.Detail.Message.Contains(expectedErrorMessagePart));
                    }
                }

                host.Close();
            }
            catch (CommunicationException)
            {
                host.Abort();
                throw;
            }
        }