public void TestSendMessage()
 {
     Service service = new Service();
     using (ServicePublisher publisher = new ServicePublisher())
     {
         publisher.Send(service);
     }
     MessageQueue mq = new MessageQueue(@".\Private$\IQ1");
     Message[] messages = mq.GetAllMessages();
     mq.Purge();
     Assert.AreEqual(1, messages.Length);
 }
 public void TestServiceContructor()
 {
     Service service = new Service();
     Console.WriteLine(service.identifier);
     Assert.IsNotNull(service.identifier);
 }
 public string XmlServiceRequest(XElement serviceHash)
 {
     Service service = new Service();
     publisher.Send(service);
     return service.identifier;
 }
 public void Send(Service service)
 {
     mq.Send(service, service.identifier);
 }