AfterPropertiesSet() public method

@see IInitializationPostOperations#AfterPropertiesSet
public AfterPropertiesSet ( ) : void
return void
コード例 #1
0
 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);
 }
コード例 #2
0
        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());

        }