Package com.jitcaforwin.extended.api.track

Examples of com.jitcaforwin.extended.api.track.Genre


   * @param name
   *            Name of the genre.
   * @return The genre.
   */
  private Genre addGenre(String name) {
    Genre newGenre = new GenreImpl(name, this.source);
    this.genres.put(name, newGenre);
    return newGenre;
  }
View Full Code Here


  }

  @Test
  public void testAddRemoveSize() throws JCollectionException {
    GenreCollection collection = new GenreCollectionImpl();
    Genre genreMock1 = EasyMock.createMock(Genre.class);
    Genre genreMock2 = EasyMock.createMock(Genre.class);
    Genre genreMock3 = EasyMock.createMock(Genre.class);
       
    assertEquals(0, collection.size());

    collection.add(genreMock1);
    assertEquals(1, collection.size());
View Full Code Here

  }
 
  @Test
  public void testGet(){
    GenreCollection collection = new GenreCollectionImpl();
    Genre genreMock1 = EasyMock.createMock(Genre.class);
    Genre genreMock2 = EasyMock.createMock(Genre.class);
   
    EasyMock.expect(genreMock1.getName()).andReturn("Genre1").times(2, 3); // times is 2 or 3, because we do not know the sorting inside the Set
    EasyMock.expect(genreMock1.getId()).andReturn(1).times(2, 3);
    EasyMock.expect(genreMock2.getName()).andReturn("Genre2").times(2, 3);
    EasyMock.expect(genreMock2.getId()).andReturn(2).times(2, 3);
   
    EasyMock.replay(genreMock1, genreMock2);
   
    collection.add(genreMock1);
    collection.add(genreMock2);
View Full Code Here

  }

  @Test(expected=JCollectionException.class)
  public void testRemove() throws JCollectionException{
    GenreCollection collection = new GenreCollectionImpl();
    Genre genreMock = EasyMock.createMock(Genre.class);
   
    collection.remove(genreMock);
  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.api.track.Genre

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.