Пример #1
0
 public void PublisherServicePublishAPackage()
 {
     File.Copy(@"Data\File1.xml", @"C:\MySynch.Source.Test.Root\File1.xml",true);
     IPublisherProxy publisherProxy = new PublisherClient();
     publisherProxy.InitiateUsingPort(8765);
     var publishedPackage = publisherProxy.PublishPackage();
     Assert.IsNotNull(publishedPackage);
     Assert.AreEqual("SCIENDO-LAPTOP",publishedPackage.Source);
     Assert.AreEqual(@"C:\MySynch.Source.Test.Root\", publishedPackage.SourceRootName);
     Assert.IsNotNull(publishedPackage.PackageId);
     Assert.IsNotNull( publishedPackage.ChangePushItems);
     Assert.AreEqual(1, publishedPackage.ChangePushItems.Count);
     Assert.AreEqual(@"C:\MySynch.Source.Test.Root\File1.xml", publishedPackage.ChangePushItems[0].AbsolutePath);
     Assert.AreEqual(OperationType.Update, publishedPackage.ChangePushItems[0].OperationType);
     publisherProxy.RemovePackage(publishedPackage);
 }