Package com.jdkcn.myblog.service

Examples of com.jdkcn.myblog.service.EntryService


public class EntriesPageTest {

  @Test
  public void testEntriesPage() throws Exception {

    EntryService entryServiceMock = EasyMock.createMock(EntryServiceImpl.class);

    List<Entry> list = new LinkedList<Entry>();
    list.add(new Entry());
    Capture<Range> captureRange = new Capture<Range>();

    PaginationSupport<Entry> ps = new PaginationSupport<Entry>(list, list.size());
    expect(entryServiceMock.search(EasyMock.anyObject(Condition.class), EasyMock.capture(captureRange), EasyMock.anyObject(Sorter.class))).andReturn(ps)
        .once();

    Entries entries = new Entries(entryServiceMock);

    replay(entryServiceMock);
View Full Code Here


  }
 
  @Test
  public void testEntriesPageSearch() throws Exception {
   
    EntryService entryServiceMock = EasyMock.createMock(EntryServiceImpl.class);
   
    List<Entry> list = new LinkedList<Entry>();
    list.add(new Entry());
    Capture<Range> captureRange = new Capture<Range>();
   
    PaginationSupport<Entry> ps = new PaginationSupport<Entry>(list, list.size());
    expect(entryServiceMock.search(EasyMock.anyObject(Condition.class), EasyMock.capture(captureRange), EasyMock.anyObject(Sorter.class))).andReturn(ps)
    .once();
   
    Entries entries = new Entries(entryServiceMock);
    entries.setP(2);
    entries.setSize(5);
View Full Code Here

TOP

Related Classes of com.jdkcn.myblog.service.EntryService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.