Skip to content
Snippets Groups Projects
Select Git revision
  • 8f0b7f60452cab76f1cb029b9eb29d602b1fd2ea
  • master default
2 results

TestUnit.cs

Blame
  • user avatar
    Tom Wiesing authored
    8f0b7f60
    History
    TestUnit.cs 1.05 KiB
    using ConnectToSally;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace SallyConnect
    {
        class TestUnit
        {
            static void Main(string[] args) {
    
                String[] interfaces = new string[] { "theo" }; // we implement the theo interface
                String docName = "random_edit_1114717882592231.sdaf";  // something we want to name.
    
                // we first create the sally client. 
                DotNetSallyClient dns = new DotNetSallyClient("activemq:tcp://localhost:61616");//neptune.eecs.jacobs-university.de:61616
    
                //and then register a document to it. 
                SallyDocument sD = new SallyDocument(docName, interfaces);
                dns.registerDocument(sD); // register the document. 
    
                //now just wait
                Console.Read();
                /*
                System.Threading.Thread.Sleep(1000);
                if (sD.isRegistered()){
                    sD.sendToSally("some message");
                }
                Console.Read();
                 */
            }
        }
    }