import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;


public class SongCollectionTest
{
	private SongCollection collection;


	@Before
	public void createEmptyCollection()
	{
		collection = new SongCollection();
	}


	@Test	
	public void sizeOfNewCollectionIsZero()
	{
		assertEquals(0, collection.size());
	}
	

	@Test	
	public void afterAddingOneSongTheSizeIsOne()
	{
		Song song = createSong();
		collection.add(song);
		assertEquals(1, collection.size());
	}


	@Test
	public void sizeGrowsAccuratelyAsSongsAreAdded()
	{
		for (int i = 1; i <= 10; i++)
		{
			collection.add(createSong());
			assertEquals(i, collection.size());
		}
	}


	@Test
	public void afterAddingSongToCollectionTheCollectionContainsTheSong()
	{
		Song s = createSong();
		collection.add(s);
		assertTrue(collection.contains(s));
	}
}
