import eu.toldi.rss.Article;
import eu.toldi.rss.Feed;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.util.List;

public class BasicFeedTest {

    private Feed test;

    @Before
    public void setup(){
        test = new Feed("TestFeed");
    }

    @Test
    public void nameTest(){
        Assert.assertEquals("TestFeed",test.getName());
    }

    @Test
    public void nameChangeTest(){
        test.setName("Test Feed");
        Assert.assertEquals("Test Feed",test.getName());
    }

    @Test
    public void testList(){
        List<Article> articleList= test.getArticleList();
        Assert.assertEquals(0,articleList.size());
        Assert.assertEquals(articleList.size(),test.getArticleCount());
    }
}
