/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package fi.jgke.tagger.domain;

import java.util.UUID;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author jgke
 */
public class SourceTest {

    public SourceTest() {
    }

    @Test
    public void testSetGetTitle() {
        String title = UUID.randomUUID().toString();
        Source instance = new Source();
        instance.setTitle(title);
        assertEquals(title, instance.getTitle());
    }

    @Test
    public void testSetGetUrl() {
        String url = UUID.randomUUID().toString();
        Source instance = new Source();
        instance.setUrl(url);
        assertEquals(url, instance.getUrl());
    }

    @Test
    public void testSetGetTitleAndUrl() {
        String title = UUID.randomUUID().toString();
        String url = UUID.randomUUID().toString();
        Source instance = new Source();
        instance.setTitle(title);
        instance.setUrl(url);
        assertEquals(title, instance.getTitle());
        assertEquals(url, instance.getUrl());
    }
}

@@ -227,20 +227,107 @@
 va.util.
-UUID
+ArrayList;%0Aimport java.util.List;%0Aimport java.util.UUID;%0Aimport java.util.stream.Collectors
 ;%0Aimport
@@ -1275,10 +1275,719 @@
 ;%0A    %7D%0A
+%0A    @Test%0A    public void testSetGetSourcetype() %7B%0A        Type sourcetype = new Type();%0A        sourcetype.setValue(UUID.randomUUID().toString());%0A        Source instance = new Source();%0A        instance.setSourcetype(sourcetype);%0A        assertEquals(sourcetype, instance.getSourcetype());%0A    %7D%0A%0A    @Test%0A    public void testSetGetTags() throws NoSuchMethodException %7B%0A        List%3CTag%3E tags = new ArrayList%3C%3E();%0A        for (int i = 0; i %3C 3; i++) %7B%0A            Tag tag = new Tag();%0A            tag.setValue(UUID.randomUUID().toString());%0A            tags.add(tag);%0A        %7D%0A        Source instance = new Source();%0A        instance.setTags(tags);%0A        assertEquals(tags, instance.getTags());%0A    %7D%0A%0A
 %7D%0A

Add more tests for Source