|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase com.atlassian.jira.functest.framework.FuncTestCase com.atlassian.jira.webtests.EmailFuncTestCase com.atlassian.jira.webtests.AbstractSubscriptionEmailTest
public abstract class AbstractSubscriptionEmailTest
An abstract class for tests that check the integrity of subscription e-mails.
Nested Class Summary | |
---|---|
protected static class |
AbstractSubscriptionEmailTest.CountingIterator
Iterator that can be used to return a sequence of numbers. |
protected static class |
AbstractSubscriptionEmailTest.FilterConfig
Holds the configuration for a filter that can be used to create a subscription. |
Field Summary |
---|
Fields inherited from class com.atlassian.jira.webtests.EmailFuncTestCase |
---|
DEAFULT_FROM_ADDRESS, DEFAULT_SUBJECT_PREFIX, mailService, newline |
Fields inherited from class com.atlassian.jira.functest.framework.FuncTestCase |
---|
administration, assertions, backdoor, environmentData, form, funcTestHelperFactory, locator, log, navigation, oldway_consider_porting, page, parse, tester, text |
Constructor Summary | |
---|---|
AbstractSubscriptionEmailTest()
|
Method Summary | |
---|---|
protected String |
assertEditLink(String body)
Ensure that the message has a link to edit the subscription. |
protected String |
assertHtmlMessageValid(javax.mail.internet.MimeMessage message,
AbstractSubscriptionEmailTest.FilterConfig config,
String from,
String to,
String userName)
Assert that a html subscription has the correct header, start and issue content. |
protected void |
assertNotEditLink(String body)
Ensure that the message does not have a link to edit the subscription. |
protected void |
assertNotPartialLink(String body)
Ensure that the passed message does not have a link to see full seach results as all issues can be seen in the e-mail. |
protected String |
assertPartialLink(AbstractSubscriptionEmailTest.FilterConfig filterConfig,
String body)
Ensure that the passed message has a link to display the full results of the search. |
protected String |
assertTextMessageValid(javax.mail.internet.MimeMessage message,
AbstractSubscriptionEmailTest.FilterConfig config,
String from,
String to,
String userName)
Assert that a text subscription has the correct header, start and issue content. |
protected void |
subscribeToFilterAndRun(AbstractSubscriptionEmailTest.FilterConfig config,
String group)
Subscribe the current user to a filter and then run it. |
Methods inherited from class com.atlassian.jira.functest.framework.FuncTestCase |
---|
builInCustomFieldKey, getAssertions, getEnvironmentData, getTester, getWebClientListener, isDumpHTML, log, log, runBare, runTest, setEnvironmentData, setUp, setUpHttpUnitOptions, shouldSkipSetup, tearDown, xpath |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractSubscriptionEmailTest()
Method Detail |
---|
protected String assertTextMessageValid(javax.mail.internet.MimeMessage message, AbstractSubscriptionEmailTest.FilterConfig config, String from, String to, String userName) throws Exception
message
- the message to validate.config
- the filter that generated the subscription e-mail.from
- the expected location where the e-mail should be from.to
- the expected location where the e-mail should be delivered to.userName
- the username to associated with the e-mail. This is the person who created the subscroption (not
the filter).
Exception
- test just throws exception when unexpected error occurs to fail the test.protected String assertHtmlMessageValid(javax.mail.internet.MimeMessage message, AbstractSubscriptionEmailTest.FilterConfig config, String from, String to, String userName) throws Exception
message
- the message to validate.config
- the filter that generated the subscription e-mail.from
- the expected location where the e-mail should be from.to
- the expected location where the e-mail should be delivered to.userName
- the username to associated with the e-mail. This is the person who created the subscroption (not
the filter).
Exception
- test just throws exception when unexpected error occurs to fail the test.protected String assertPartialLink(AbstractSubscriptionEmailTest.FilterConfig filterConfig, String body)
filterConfig
- the filter that produced the e-mail.body
- the body of the e-mal.
protected void assertNotPartialLink(String body)
body
- the body of the e-mail to search.protected String assertEditLink(String body)
body
- the body of the message to check.
protected void assertNotEditLink(String body)
body
- the string of the message minus the edit link.protected void subscribeToFilterAndRun(AbstractSubscriptionEmailTest.FilterConfig config, String group)
config
- the configuration for the filter to subscribe to.group
- the group to subscribe to the filter for. This can be left null
to indicate that a personal subscription should be made.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |