public void DoExecuteTest() { FtpGetTasklet tasklet = new FtpGetTasklet { LocalDirectory = "C:/temp/DL", FileNamePattern = "*.txt", Host = "ftp.XXX.xxx", Username = "******", Password = "******", RemoteDirectory = "/" }; tasklet.AfterPropertiesSet(); Assert.IsTrue(tasklet.DoExecute()); }
public void AfterPropertiesSetTest() { FtpGetTasklet tasklet = new FtpGetTasklet { FileNamePattern = "*.txt", Host = "ftp.mysite.com", Username = "******", Password = "******", RemoteDirectory = "/" }; try { tasklet.AfterPropertiesSet(); } catch (Exception e) { Assert.IsTrue(e is ArgumentException); } tasklet.LocalDirectory = "C:/temp"; tasklet.AfterPropertiesSet(); Assert.IsNotNull(tasklet.LocalDirectory); }