Package com.jitcaforwin.id3

Examples of com.jitcaforwin.id3.ID3Tag


public class FactoryTest {

  @Test
  public void testFile() throws ID3TagException {
    File fileMock = EasyMock.createMock(File.class);
    ITagFactory factoryMock = EasyMock.createMock(ITagFactory.class);
    EasyMock.expect(factoryMock.getTag(fileMock)).andReturn(null);

    EasyMock.replay(fileMock, factoryMock);
    ID3TagFactory.setInstance(factoryMock);

    ID3TagFactory.getID3Tag(fileMock);
View Full Code Here


    Track trackMock = EasyMock.createMock(Track.class);
    FileOrCDTrack fileTrackMock = EasyMock.createMock(FileOrCDTrack.class);
    EasyMock.expect(trackMock.isFileOrCDTrack()).andReturn(true);
    EasyMock.expect(trackMock.getFileOrCDTrack()).andReturn(fileTrackMock);
    EasyMock.expect(fileTrackMock.getFile()).andReturn(fileMock);
    ITagFactory factoryMock = EasyMock.createMock(ITagFactory.class);
    EasyMock.expect(factoryMock.getTag((File) fileMock)).andReturn(null);
   
    EasyMock.replay(fileMock, factoryMock, trackMock, fileTrackMock);
    ID3TagFactory.setInstance(factoryMock);
   
    ID3TagFactory.getID3Tag(trackMock);
View Full Code Here

  @Test
  public void testBasicTrack() throws TrackDeletedException, ID3TagException{
    File fileMock = EasyMock.createMock(File.class);
    IITFileOrCDTrack trackMock = EasyMock.createMock(IITFileOrCDTrack.class);
    EasyMock.expect(trackMock.getLocation()).andReturn(fileMock);
    ITagFactory factoryMock = EasyMock.createMock(ITagFactory.class);
    EasyMock.expect(factoryMock.getTag((File) fileMock)).andReturn(null);
   
    EasyMock.replay(fileMock, factoryMock, trackMock);
    ID3TagFactory.setInstance(factoryMock);
   
    ID3TagFactory.getID3Tag(trackMock);
View Full Code Here

    }
    return instance;
  }

  private static ITagFactory getCurrentImplementation() {
    return new jidID3TagFactory();
  }
View Full Code Here

    }
    return instance;
  }

  private static ITagFactory getCurrentImplementation() {
    return new jidID3TagFactory();
  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.id3.ID3Tag

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.