1 | package org.expressolivre.cte.calendar.visualizar; |
---|
2 | |
---|
3 | import java.text.SimpleDateFormat; |
---|
4 | import java.util.Calendar; |
---|
5 | |
---|
6 | import org.expressolivre.cte.common.BaseCalendarTestCase; |
---|
7 | import org.expressolivre.cte.pages.calendar.AppointmentViewPage; |
---|
8 | import org.expressolivre.cte.pages.calendar.CalendarTodayViewPage; |
---|
9 | import org.testng.Assert; |
---|
10 | import org.testng.annotations.Parameters; |
---|
11 | import org.testng.annotations.Test; |
---|
12 | |
---|
13 | /** |
---|
14 | * Caso de Teste: EL-964:Exibir compromisso |
---|
15 | * |
---|
16 | * Link: http://testlink.expressolivre.org/linkto.php?tprojectPrefix=EL&item= |
---|
17 | * testcase&id=EL-964 |
---|
18 | * |
---|
19 | * @author L.F.Estivalet (Serpro) |
---|
20 | * |
---|
21 | * Created on Jul 25, 2011 at 10:37:43 AM |
---|
22 | * |
---|
23 | */ |
---|
24 | public class ExibirCompromissoTestCase extends BaseCalendarTestCase { |
---|
25 | |
---|
26 | /** |
---|
27 | * Exibe um compromisso da data corrente. |
---|
28 | * |
---|
29 | * @param tipo |
---|
30 | * @param titulo |
---|
31 | * @param inicio |
---|
32 | * @param fim |
---|
33 | * @param prioridade |
---|
34 | */ |
---|
35 | @Parameters({ "tipo", "titulo", "inicio", "fim", "prioridade" }) |
---|
36 | @Test |
---|
37 | public void exibirCompromissoDataCorrente(String tipo, String titulo, |
---|
38 | String inicio, String fim, String prioridade) { |
---|
39 | CalendarTodayViewPage ctvp = super.openTodayView(); |
---|
40 | String id = ctvp.getAppointmentId(titulo); |
---|
41 | |
---|
42 | Calendar cal = Calendar.getInstance(); |
---|
43 | SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); |
---|
44 | String today = sdf.format(cal.getTime()); |
---|
45 | |
---|
46 | AppointmentViewPage avp = cp.openAppointmentViewPage(id); |
---|
47 | Assert.assertEquals(avp.getTitle(), titulo); |
---|
48 | // Assert.assertEquals(avp.getStartTime(), today + " - " + inicio); |
---|
49 | // Assert.assertEquals(avp.getEndTime(), today + " - " + fim); |
---|
50 | // Assert.assertEquals(avp.getPriority(), prioridade); |
---|
51 | } |
---|
52 | } |
---|