source: devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/calendar/AdicionarCompromisso.java @ 3782

Revision 3782, 1.3 KB checked in by luiz-fernando, 13 years ago (diff)

Ticket #1402 - Mudança no nome dos pacotes das classes

Line 
1package org.expressolivre.cte.calendar;
2
3import java.text.SimpleDateFormat;
4import java.util.Calendar;
5
6import org.expressolivre.cte.common.BaseCalendarTestCase;
7import org.expressolivre.cte.pages.calendar.AppointmentPage;
8import org.testng.annotations.Parameters;
9import org.testng.annotations.Test;
10
11
12/**
13 * @author L.F.Estivalet (Serpro)
14 *
15 *         Created on Feb 8, 2011 at 9:36:08 AM
16 *
17 */
18public class AdicionarCompromisso extends BaseCalendarTestCase {
19
20        @Parameters({ "titulo", "horaInicial", "minutoInicial", "horaFinal",
21                        "minutoFinal" })
22        @Test(dependsOnMethods = { "init" })
23        public void test(String titulo, String horaInicial, String minutoInicial,
24                        String horaFinal, String minutoFinal) {
25
26                // Pega data corrente.
27                Calendar cal = Calendar.getInstance();
28                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
29                SimpleDateFormat sdf2 = new SimpleDateFormat("dd/MM/yyyy");
30
31                // Adiciona um compromisso para data atual.
32                AppointmentPage ap = super.newAppointment(sdf.format(cal.getTime()));
33                ap.setTitle(titulo);
34                ap.setStartDate(sdf2.format(cal.getTime()));
35                ap.setStartHour(horaInicial);
36                ap.setStartMinute(minutoInicial);
37                ap.setEndDate(sdf2.format(cal.getTime()));
38                ap.setEndHour(horaFinal);
39                ap.setEndMinute(minutoFinal);
40
41                ap.saveAppointment();
42        }
43}
Note: See TracBrowser for help on using the repository browser.