Package br.com.caelum.restfulie

Source Code of br.com.caelum.restfulie.LinkTest

package br.com.caelum.restfulie;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;

import org.junit.Test;

import br.com.caelum.restfulie.http.DefaultRestClient;
import br.com.caelum.restfulie.http.Request;

public class LinkTest {

  @Test
  public void shouldUseTheMediaTypeProviedByTheUser() {
    DefaultRestClient restfulie = new DefaultRestClient();
    Request request = restfulie.at("uri").as("application/xml");
   
    assertThat(request.getHeaders().get("Content-type"),is(equalTo("application/xml")));
  }
 
 
}
TOP

Related Classes of br.com.caelum.restfulie.LinkTest

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.