1 | package org.expressolivre.cte.email.compor; |
---|
2 | |
---|
3 | import java.io.IOException; |
---|
4 | |
---|
5 | import org.expressolivre.cte.common.BaseEmailTestCase; |
---|
6 | import org.expressolivre.cte.common.IOUtil; |
---|
7 | import org.expressolivre.cte.pages.email.MailPage; |
---|
8 | import org.testng.Assert; |
---|
9 | import org.testng.annotations.Test; |
---|
10 | |
---|
11 | /** |
---|
12 | * Suite:[FUN02.1] Compor Mensagem |
---|
13 | * |
---|
14 | * Caso de Teste: EL-523:Enviar mensagem com corpo superior a 100kb |
---|
15 | * |
---|
16 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
17 | * testcase&id=EL-538 |
---|
18 | * |
---|
19 | * @author L.F.Estivalet (Serpro) |
---|
20 | * |
---|
21 | * Created on Mai 9, 2011 at 2:41:14 PM |
---|
22 | * |
---|
23 | */ |
---|
24 | public class EnviarEmailCorpo100TestCase extends BaseEmailTestCase { |
---|
25 | |
---|
26 | /** |
---|
27 | * Executa o teste. Envia mensagem para email, assunto e texto superior a |
---|
28 | * 100kb. Apos envio, verifica se o email foi movido para a pasta de emails |
---|
29 | * enviados. |
---|
30 | * |
---|
31 | * @throws IOException |
---|
32 | */ |
---|
33 | @Test |
---|
34 | public void test() throws IOException { |
---|
35 | |
---|
36 | String text = IOUtil.readFully(EnviarEmailCorpo100TestCase.class |
---|
37 | .getResourceAsStream("/texto100k.txt")); |
---|
38 | mp.composeEmail(EMAIL_TESTE_1, EMAIL_ASSUNTO_TEXTO_100k, text); |
---|
39 | mp.sendMail(); |
---|
40 | mp.assertMessage(MSG_EMAIL_ENVIADO); |
---|
41 | Assert.assertNotNull(mp.findEmailIdBySubject(MailPage.SENT_FOLDER, |
---|
42 | EMAIL_ASSUNTO_TEXTO_100k)); |
---|
43 | } |
---|
44 | } |
---|