package org.slc.sli.modeling.rest;

import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.Before;
import org.junit.Test;
import org.junit.internal.builders.NullBuilder;

public class LinkTest {
    private Link link; // class under test
    
    private static final String RESOURCE_TYPE = "resourceType";
    private static final String REL = "rel";
    private static final String REV = "rev";
    private static final ArrayList<Documentation> DOC = new ArrayList<Documentation>(0);

    @Before
    public void setup() throws Exception {
        link = new Link(RESOURCE_TYPE, REL, REV, DOC);
    }
    
    @Test (expected = NullPointerException.class)
    public void testNullResourceType() {
        new Link(null, REL, REV, DOC);
    }

    @Test (expected = NullPointerException.class)
    public void testNullRel() {
        new Link(RESOURCE_TYPE, null, REV, DOC);
    }

    @Test (expected = NullPointerException.class)
    public void testNullRev() {
        new Link(RESOURCE_TYPE, REL, null, DOC);
    }

    @Test (expected = NullPointerException.class)
    public void testNullDoc() {
        new Link(RESOURCE_TYPE, REL, REV, null);
    }

    @Test
    public void testGetResourceType() {
        assertEquals(RESOURCE_TYPE, link.getResourceType());
    }

    @Test
    public void testGetRelType() {
        assertEquals(REL, link.getRel());
    }

    @Test
    public void testGetRev() {
        assertEquals(REV, link.getRev());
    }

}

@@ -190,16 +190,79 @@
 ilder;%0A%0A
+/**%0A * JUnit test for Link class.%0A *%0A * @author wscott%0A *%0A */%0A%0A
 public c
@@ -320,20 +320,16 @@
 er test%0A
-    
 %0A    pri
@@ -681,20 +681,16 @@
 ;%0A    %7D%0A
-    
 %0A    @Te

Add comment for checkstyle.