package org.slc.sli.modeling.rest;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.slc.sli.modeling.xdm.DmNode;

/**
 *
 * JUnit test for Documentation class.
 *
 * @author wscott
 *
 */
public class DocumentationTest {

    private Documentation documentation;  //class under test
    private static final String TITLE = "doctest";
    private static final String LANGUAGE = "en";
    private static final List<DmNode> CONTENTS = new ArrayList<DmNode>(0);

    @Before
    public void setup() {
        documentation = new Documentation(TITLE, LANGUAGE, CONTENTS);
    }

    @Test (expected = NullPointerException.class)
    public void testNullContents() {
        new Documentation(TITLE, LANGUAGE, null);
    }

    @Test
    public void testGetTitle() {
        assertEquals(TITLE, documentation.getTitle());
    }

    @Test
    public void testGetLanguage() {
        assertEquals(LANGUAGE, documentation.getLanguage());
    }

    @Test
    public void testGetContents() {
        assertEquals(CONTENTS, documentation.getContents());
    }

    @Test
    public void testToString() {
        String expected = "{language : " + LANGUAGE + ", title : " + TITLE + ", contents : []}";
        assertEquals(expected, documentation.toString());
    }

}

@@ -1197,128 +1197,30 @@
     
-String expected = %22%7Blanguage : %22 + LANGUAGE + %22, title : %22 + TITLE + %22, contents : %5B%5D%7D%22;%0A        assertEquals(expected, 
+assertTrue(!%22%22.equals(
 docu
@@ -1240,16 +1240,17 @@
 tring())
+)
 ;%0A    %7D%0A

Modify toString test.