[4890] | 1 | package org.expressolivre.cte.calendar.visualizar; |
---|
[4864] | 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 | @Parameters({ "tipo", "titulo", "inicio", "fim", "prioridade" }) |
---|
| 27 | @Test |
---|
| 28 | public void exibirCompromisso(String tipo, String titulo, String inicio, |
---|
| 29 | String fim, String prioridade) { |
---|
| 30 | CalendarTodayViewPage ctvp = super.openTodayView(); |
---|
| 31 | String id = ctvp.getAppointmentId(titulo); |
---|
| 32 | |
---|
| 33 | Calendar cal = Calendar.getInstance(); |
---|
| 34 | SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); |
---|
| 35 | String today = sdf.format(cal.getTime()); |
---|
| 36 | |
---|
| 37 | AppointmentViewPage avp = cp.openAppointmentViewPage(id); |
---|
| 38 | Assert.assertEquals(avp.getTitle(), titulo); |
---|
[4902] | 39 | // Assert.assertEquals(avp.getStartTime(), today + " - " + inicio); |
---|
| 40 | // Assert.assertEquals(avp.getEndTime(), today + " - " + fim); |
---|
| 41 | // Assert.assertEquals(avp.getPriority(), prioridade); |
---|
[4864] | 42 | } |
---|
| 43 | } |
---|