Package com.eclipsesource.restfuse.example

Source Code of com.eclipsesource.restfuse.example.DynamicHeaderTest

package com.eclipsesource.restfuse.example;

import static com.eclipsesource.restfuse.Assert.assertOk;

import org.junit.Rule;
import org.junit.runner.RunWith;

import com.eclipsesource.restfuse.Destination;
import com.eclipsesource.restfuse.HttpJUnitRunner;
import com.eclipsesource.restfuse.Method;
import com.eclipsesource.restfuse.Response;
import com.eclipsesource.restfuse.annotation.Context;
import com.eclipsesource.restfuse.annotation.HttpTest;

@RunWith(HttpJUnitRunner.class)
public class DynamicHeaderTest {

  @Rule
  public Destination restfuse = getDestination();
  @Context
  private Response response;

  @HttpTest(method = Method.GET, path = "/")
  public void checkRestfuseOnlineStatus() {
    assertOk( response );
  }

  private Destination getDestination() {
    Destination destination = new Destination( this, "http://restfuse.com" );
    destination.getRequestContext().addHeader( "Cookie", "name:value" );
    return destination;
  }
}
TOP

Related Classes of com.eclipsesource.restfuse.example.DynamicHeaderTest

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.