Exemplo n.º 1
0
 public void CleanUpCloseChannel()
 {
     var channel = new Wcf();
     channel.Endpoints.Add(new NetTcp { Address = "net.tcp://localhost/client" });
     channel.Initialise(null);
     channel.CleanUp();
 }
Exemplo n.º 2
0
 public void InitialiseOpensTheWcfHost()
 {
     var channel = new Wcf();
     var address = "net.tcp://localhost/client";
     channel.Endpoints.Add(new NetTcp { Address = address });
     var opened = false;
     try
     {
         opened = channel.Initialise(null);
         Assert.IsTrue(opened);
         var connection = new ServerConnection(address, new NetTcpBinding());
         var canPing = connection.Ping();
         Assert.IsTrue(canPing);
     }
     finally
     {
         if (opened)
         {
             channel.CleanUp();
         }
     }
 }
Exemplo n.º 3
0
 public void CleanUpDoesNothingIfNotOpen()
 {
     var channel = new Wcf();
     channel.CleanUp();
 }