Package com.jitcaforwin.extended.impl.internal.factories.trackbuffering

Examples of com.jitcaforwin.extended.impl.internal.factories.trackbuffering.Clock


public class TrackBufferTest {

  @Test
  public void testTrackBuffer(){
    IITTrackCollection collectionMock = EasyMock.createMock(IITTrackCollection.class);
    Clock clockMock = EasyMock.createMock(Clock.class);
   
    EasyMock.expect(clockMock.currentTime()).andReturn(System.currentTimeMillis()).anyTimes();
    EasyMock.replay(collectionMock);
    EasyMock.replay(clockMock);
   
    TrackBuffering buffer = new TrackBuffering(clockMock);
    buffer.put("Test-Collection", collectionMock);
View Full Code Here


  }
 
  @Test
  public void testTrackBufferCleanup(){
    IITTrackCollection collectionMock = EasyMock.createMock(IITTrackCollection.class);
    Clock clockMock = EasyMock.createMock(Clock.class);
   
    EasyMock.expect(clockMock.currentTime()).andReturn(0l);
    EasyMock.expect(clockMock.currentTime()).andReturn(0l);
    EasyMock.expect(clockMock.currentTime()).andReturn(0l);
    EasyMock.expect(clockMock.currentTime()).andReturn(0l);
    EasyMock.expect(clockMock.currentTime()).andReturn(1000001l);
    EasyMock.replay(collectionMock);
    EasyMock.replay(clockMock);
   
    TrackBuffering buffer = new TrackBuffering(clockMock);
    buffer.put("Test-Collection", collectionMock);
View Full Code Here

  private TrackBuffering tracksAlbum;

  public SearchService(IITPlaylist itPlaylist, Source source) {
    this.itPlaylist = itPlaylist;
    this.source = source;
    this.tracksArtist = new TrackBuffering(new Clock());
    this.tracksComposer = new TrackBuffering(new Clock());
    this.tracksAlbum = new TrackBuffering(new Clock());
  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.impl.internal.factories.trackbuffering.Clock

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.