コード例 #1
0
        public void AfterPropertiesSetTest()
        {
            FtpPutTasklet tasklet = new FtpPutTasklet
            {
                FileName = "C:/temp/MyDummyTasklet_out_UP.txt",
                Username = "******",
                Password = "******"
            };

            try
            {
                tasklet.AfterPropertiesSet();
            }
            catch (Exception e)
            {
                Assert.IsTrue(e is ArgumentException);
            }
            tasklet.Host = "ftp.mysite.com";
            tasklet.AfterPropertiesSet();
            Assert.IsNotNull(tasklet.Host);
        }
コード例 #2
0
        public void DoExecuteTest()
        {
            FtpPutTasklet tasklet = new FtpPutTasklet
            {
                FileName = "C:/temp/MyDummyTasklet_out_UP.txt",
                Host     = "ftp.XXX.xxx",
                Username = "******",
                Password = "******"
            };

            tasklet.AfterPropertiesSet();
            Assert.IsTrue(tasklet.DoExecute());
        }