public void Validate() { var ofa = new FtpAdapter.Outbound(); Assert.That( () => ((ISupportValidation)ofa).Validate(), Throws.TypeOf <BindingException>() .With.Message.EqualTo("The Server Address is not defined")); }
public void Validate() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var ofa = new FtpAdapter.Outbound(); Invoking(() => ((ISupportValidation)ofa).Validate()) .Should().Throw <BindingException>() .WithMessage("The Server Address is not defined"); }
public void ValidateDoesNotThrow() { var ofa = new FtpAdapter.Outbound( a => { a.Server = "ftp.server.com"; a.Folder = "/in/from_bts/"; a.UserName = "******"; a.Password = "******"; a.AfterPut = "cd /"; a.BeforePut = "cd /"; a.AllocateStorage = true; a.ConnectionLimit = 10; }); Assert.That(() => ((ISupportValidation)ofa).Validate(), Throws.Nothing); }
public void ValidateDoesNotThrow() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var ofa = new FtpAdapter.Outbound( a => { a.Server = "ftp.server.com"; a.Folder = "/in/from_bts/"; a.UserName = "******"; a.Password = "******"; a.AfterPut = "cd /"; a.BeforePut = "cd /"; a.AllocateStorage = true; a.ConnectionLimit = 10; }); Invoking(() => ((ISupportValidation)ofa).Validate()).Should().NotThrow(); }
public void SerializeToXml() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var ofa = new FtpAdapter.Outbound( a => { a.Server = "ftp.server.com"; a.Folder = "/in/from_bts/"; a.UserName = "******"; a.Password = "******"; a.AfterPut = "cd /"; a.BeforePut = "cd /"; a.AllocateStorage = true; a.ConnectionLimit = 10; }); var xml = ofa.GetAdapterBindingInfoSerializer().Serialize(); xml.Should().Be( "<CustomProps>" + "<AdapterConfig vt=\"8\">" + SecurityElement.Escape( "<Config>" + "<uri>ftp://ftp.server.com:21//in/from_bts//%MessageID%.xml</uri>" + "<firewallPort>21</firewallPort>" + "<firewallType>NoFirewall</firewallType>" + "<passiveMode>False</passiveMode>" + "<serverAddress>ftp.server.com</serverAddress>" + "<serverPort>21</serverPort>" + "<targetFolder>/in/from_bts/</targetFolder>" + "<targetFileName>%MessageID%.xml</targetFileName>" + "<userName>ftp-user</userName>" + "<password>p@ssw0rd</password>" + "<afterPut>cd /</afterPut>" + "<beforePut>cd /</beforePut>" + "<allocateStorage>True</allocateStorage>" + "<representationType>binary</representationType>" + "<ftpsConnMode>Explicit</ftpsConnMode>" + "<useDataProtection>True</useDataProtection>" + "<connectionLimit>10</connectionLimit>" + "</Config>") + "</AdapterConfig>" + "</CustomProps>"); }