public void DistributorDistreibuteMessage_Ok() { if (File.Exists(@"C:\MySynch.Dest.Test.Root\File1.xml")) File.Delete(@"C:\MySynch.Dest.Test.Root\File1.xml"); IDistributorMonitorProxy distributorMonitorProxy = new DistributorMonitorClient(); distributorMonitorProxy.InitiateUsingPort(8765); var listOfComponents = distributorMonitorProxy.ListAvailableChannels(); Assert.IsNotNull(listOfComponents); File.Copy(@"Data\File1.xml", @"C:\MySynch.Source.Test.Root\File1.xml", true); }
public void ConnectToADistributor(EventHandler<ProgressChangedEventArgs> progressChanged, int localDistributorPort, out IDistributorMonitorProxy distributorMonitorProxy, out ListAvailableChannelsResponse availableComponents) { progressChanged(this, new ProgressChangedEventArgs(0, "Connecting to Distributor at port: " + localDistributorPort)); distributorMonitorProxy = new DistributorMonitorClient(); distributorMonitorProxy.InitiateUsingPort(localDistributorPort); progressChanged(this, new ProgressChangedEventArgs(0, "Connected to Distributor at port: " + localDistributorPort + " checking registrations...")); availableComponents = distributorMonitorProxy.ListAvailableChannels(); progressChanged(this, new ProgressChangedEventArgs(0, string.Format( "{0} channels registered at the distributor", availableComponents.Channels.Count()))); }
public void DistributorUpAndAccessible() { IDistributorMonitorProxy distributorMonitorProxy = new DistributorMonitorClient(); distributorMonitorProxy.InitiateUsingPort(8765); var listAvailableChannels = distributorMonitorProxy.ListAvailableChannels(); Assert.IsNotNull(listAvailableChannels); Assert.AreEqual("SCIENDO-LAPTOP", listAvailableChannels.Name); Assert.AreEqual(1, listAvailableChannels.Channels.Count); Assert.AreEqual("IPublisher.Remote", listAvailableChannels.Channels[0].PublisherInfo.InstanceName); Assert.AreEqual(8765, listAvailableChannels.Channels[0].PublisherInfo.Port); Assert.AreEqual(Status.Ok, listAvailableChannels.Channels[0].Status); Assert.IsNull(listAvailableChannels.Channels[0].PublisherInfo.CurrentPackage); Assert.IsNotNull(listAvailableChannels.Channels[0].SubscriberInfo); Assert.AreEqual("ISubscriber.Remote", listAvailableChannels.Channels[0].SubscriberInfo.InstanceName); Assert.AreEqual(8765,listAvailableChannels.Channels[0].SubscriberInfo.Port); Assert.AreEqual(Status.Ok, listAvailableChannels.Channels[0].SubscriberInfo.Status); Assert.AreEqual(@"C:\MySynch.Dest.Test.Root\", listAvailableChannels.Channels[0].SubscriberInfo.RootPath); Assert.IsNull(listAvailableChannels.Channels[0].SubscriberInfo.CurrentPackage); }
public Window1() { using (LoggingManager.LogMySynchPerformance()) { InitializeComponent(); try { IDistributorMonitorProxy distributorMonitorProxy = new DistributorMonitorClient(); distributorMonitorProxy.InitiateUsingPort(8765); this.DataContext = new NotificationDetailsViewModel(distributorMonitorProxy); } catch (Exception ex) { LoggingManager.LogMySynchSystemError(ex); throw; } } }