Subversion Repositories SmartDukaan

Rev

Rev 3269 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3269 Rev 3390
Line 2... Line 2...
2
 * 
2
 * 
3
 */
3
 */
4
package in.shop2020.crm.handler;
4
package in.shop2020.crm.handler;
5
 
5
 
6
import static org.junit.Assert.assertEquals;
6
import static org.junit.Assert.assertEquals;
-
 
7
import in.shop2020.crm.domain.SearchFilter;
7
import in.shop2020.crm.domain.Ticket;
8
import in.shop2020.crm.domain.Ticket;
8
 
9
 
9
import java.util.Date;
10
import java.util.Date;
10
import java.util.List;
11
import java.util.List;
11
 
12
 
-
 
13
import org.apache.commons.lang.builder.ToStringBuilder;
12
import org.apache.thrift.TException;
14
import org.apache.thrift.TException;
13
import org.junit.Before;
15
import org.junit.Before;
14
import org.junit.Ignore;
16
import org.junit.Ignore;
15
import org.springframework.beans.factory.annotation.Autowired;
17
import org.springframework.beans.factory.annotation.Autowired;
16
import org.springframework.context.ApplicationContext;
18
import org.springframework.context.ApplicationContext;
Line 40... Line 42...
40
     * Test method for {@link in.shop2020.crm.handler.TicketHandler#fetchTickets(long, long)}.
42
     * Test method for {@link in.shop2020.crm.handler.TicketHandler#fetchTickets(long, long)}.
41
     * @throws TException 
43
     * @throws TException 
42
     */
44
     */
43
    @Ignore
45
    @Ignore
44
    public void testFetchTickets() throws TException {
46
    public void testFetchTickets() throws TException {
45
        List<Ticket> tickets = ticketHandler.getTickets(123);
47
        SearchFilter s = new SearchFilter();
46
        assertEquals(5, tickets.size());
48
//        s.setTicketId(200l);
47
        tickets = ticketHandler.getTickets(123);
49
//        s.setTicketAssigneeIds(null);
-
 
50
//        s.setTicketAssigneeIds(new ArrayList<Long>());
-
 
51
//        s.setActivityCreatorIds(Collections.singletonList(2l));
48
        assertEquals(4, tickets.size());
52
//        s.setEndTimestamp(new Date());
-
 
53
        s.setCustomerEmailId("mandeepdhir@gmail.com");
49
        tickets = ticketHandler.getTickets(123);
54
        List<Ticket> tickets = ticketHandler.getTickets(s);
50
        assertEquals(9, tickets.size());
55
        assertEquals("", ToStringBuilder.reflectionToString(tickets));
51
    }
56
    }
52
 
57
 
53
    /**
58
    /**
54
     * Test method for {@link in.shop2020.crm.handler.TicketHandler#updateTicket(in.shop2020.crm.domain.Ticket)}.
59
     * Test method for {@link in.shop2020.crm.handler.TicketHandler#updateTicket(in.shop2020.crm.domain.Ticket)}.
55
     * @throws TException 
60
     * @throws TException 
56
     */
61
     */
57
    @Ignore
62
    @Ignore
58
    public void testUpdateTicket() throws TException {
63
    public void testUpdateTicket() throws TException {
-
 
64
        SearchFilter s = new SearchFilter();
-
 
65
        s.setTicketId(99l);
59
        List<Ticket> tickets = ticketHandler.getTickets(99);
66
        List<Ticket> tickets = ticketHandler.getTickets(s);
60
        Ticket ticket = tickets.get(0);
67
        Ticket ticket = tickets.get(0);
61
        ticketHandler.updateTicket(ticket);
68
        ticketHandler.updateTicket(ticket);
62
    }
69
    }
63
 
70
 
64
    /**
71
    /**