import org.junit.*;
import static org.junit.Assert.*;


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 = createTestSong();
		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());
		}
	}


	private Song createTestSong()
	{
		return new Song();
	}
}
