Package org.wiztools.restclient.util

Source Code of org.wiztools.restclient.util.HttpUtilTest

package org.wiztools.restclient.util;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.wiztools.commons.Charsets;
import org.wiztools.restclient.bean.ContentType;
import org.wiztools.restclient.bean.ContentTypeBean;

/**
*
* @author subwiz
*/
public class HttpUtilTest {
   
    public HttpUtilTest() {
    }
   
    @BeforeClass
    public static void setUpClass() {
    }
   
    @AfterClass
    public static void tearDownClass() {
    }
   
    @Before
    public void setUp() {
    }
   
    @After
    public void tearDown() {
    }

    /**
     * Test of getContentType method, of class HttpUtil.
     */
    @Test
    public void testGetContentType_String() {
        System.out.println("getContentType");
        String header = "application/vnd.mnet.staticwebspaces+xml;version=1;charset=UTF-8";
        ContentType expResult = new ContentTypeBean("application/vnd.mnet.staticwebspaces+xml", Charsets.UTF_8);
        ContentType result = HttpUtil.getContentType(header);
        assertEquals(expResult, result);
    }   
}
TOP

Related Classes of org.wiztools.restclient.util.HttpUtilTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.