Summer.Batch.Extra.EmailSupport.EmailTasklet.AfterPropertiesSet C# (CSharp) 메소드

AfterPropertiesSet() 공개 메소드

@see IInitializationPostOperations#AfterPropertiesSet
public AfterPropertiesSet ( ) : void
리턴 void
        public void AfterPropertiesSet()
        {
            Assert.NotNull(Host, "EmailTasklet : The Host must be specified");
            Assert.NotNull(From, "EmailTasklet : The From address must be specified");
            Assert.State(_to.Any() || _cc.Any() || _bcc.Any(), "EmailTasklet : at least one recipient must be specified");
            Assert.NotNull(Subject, "EmailTasklet : the subject must be specified");
            Assert.NotNull(Body, "EmailTasklet : the body resource must be specified");
            Assert.State(Body.Exists(), "EmailTasklet : the body resource must exist");
            Assert.IsTrue(LineLength >= 0, "LineLength : if specified, the line LineLength must be equals or superior to 0");
        }
    }

Usage Example

예제 #1
0
        public void AfterPropertiesSetTest()
        {
            EmailTasklet tasklet = new EmailTasklet();
            try
            {
                tasklet.AfterPropertiesSet();
            }
            catch (Exception e)
            {
                Assert.IsTrue(e is ArgumentException);
            }
            SetupTasklet(tasklet, 0);

            tasklet.AfterPropertiesSet();
            Assert.IsNotNull(tasklet);
        }
All Usage Examples Of Summer.Batch.Extra.EmailSupport.EmailTasklet::AfterPropertiesSet