Search in sources :

Example 16 with NewCookie

use of jakarta.ws.rs.core.NewCookie in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method constructorTest18.

/*
   * @testName: constructorTest18
   * 
   * @assertion_ids: JAXRS:JAVADOC:108; JAXRS:JAVADOC:100; JAXRS:JAVADOC:101;
   * JAXRS:JAVADOC:103; JAXRS:JAVADOC:51; JAXRS:JAVADOC:53; JAXRS:JAVADOC:54;
   * JAXRS:JAVADOC:55; JAXRS:JAVADOC:56;
   * 
   * @test_Strategy: Create a NewCookie instance using constructor
   * Cookie(String, String) NewCookie(Cookie, String comment, int maxAge,
   * boolean secure)
   */
@Test
public void constructorTest18() throws Fault {
    String name = "name_1";
    String value = "value_1";
    String comment = "";
    String domain = "";
    String path = "";
    int maxage = jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE;
    int version = 1;
    boolean secure = false;
    Cookie ck18 = new Cookie(name, value);
    NewCookie nck18 = new NewCookie(ck18, comment, maxage, secure);
    verifyNewCookie(nck18, name, value, path, domain, version, comment, maxage, secure);
}
Also used : Cookie(jakarta.ws.rs.core.Cookie) NewCookie(jakarta.ws.rs.core.NewCookie) NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Example 17 with NewCookie

use of jakarta.ws.rs.core.NewCookie in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method constructorTest7.

/*
   * @testName: constructorTest7
   * 
   * @assertion_ids: JAXRS:JAVADOC:105; JAXRS:JAVADOC:100; JAXRS:JAVADOC:101;
   * JAXRS:JAVADOC:103; JAXRS:JAVADOC:53; JAXRS:JAVADOC:54; JAXRS:JAVADOC:55;
   * JAXRS:JAVADOC:56;
   * 
   * @test_Strategy: Create a NewCookie instance using constructor
   * NewCookie(java.lang.String name, java.lang.String value, java.lang.String
   * path, java.lang.String domain, java.lang.String comment, int maxAge,
   * boolean secure)
   */
@Test
public void constructorTest7() throws Fault {
    String name = "name_1";
    String value = "value_1";
    String path = "/acme";
    String domain = "";
    String comment = "";
    int maxage = jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE;
    int version = 1;
    boolean secure = false;
    NewCookie nck7 = new NewCookie(name, value, path, domain, comment, maxage, secure);
    verifyNewCookie(nck7, name, value, path, domain, version, comment, maxage, secure);
}
Also used : NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Example 18 with NewCookie

use of jakarta.ws.rs.core.NewCookie in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method constructorTest11.

/*
   * @testName: constructorTest11
   * 
   * @assertion_ids: JAXRS:JAVADOC:106; JAXRS:JAVADOC:100; JAXRS:JAVADOC:101;
   * JAXRS:JAVADOC:103; JAXRS:JAVADOC:53; JAXRS:JAVADOC:54; JAXRS:JAVADOC:55;
   * JAXRS:JAVADOC:56;
   * 
   * @test_Strategy: Create a NewCookie instance using constructor
   * NewCookie(java.lang.String name, java.lang.String value, java.lang.String
   * path, java.lang.String domain, java.lang.String comment, int maxAge,
   * boolean secure)
   */
@Test
public void constructorTest11() throws Fault {
    String name = "name_1";
    String value = "value_1";
    String path = "/acme";
    String domain = "y.x.foo.com";
    int version = 1;
    String comment = "cts test comment";
    int maxage = 12345;
    boolean secure = false;
    NewCookie nck11 = new NewCookie(name, value, path, domain, version, comment, maxage, secure);
    verifyNewCookie(nck11, name, value, path, domain, version, comment, maxage, secure);
}
Also used : NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Example 19 with NewCookie

use of jakarta.ws.rs.core.NewCookie in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method constructorTest14.

/*
   * @testName: constructorTest14
   * 
   * @assertion_ids: JAXRS:JAVADOC:106; JAXRS:JAVADOC:100; JAXRS:JAVADOC:101;
   * JAXRS:JAVADOC:103; JAXRS:JAVADOC:53; JAXRS:JAVADOC:54; JAXRS:JAVADOC:55;
   * JAXRS:JAVADOC:56;
   * 
   * @test_Strategy: Create a version 1 NewCookie instance using constructor
   * NewCookie(java.lang.String name, java.lang.String value, java.lang.String
   * path, java.lang.String domain, int version, java.lang.String comment, int
   * maxAge, boolean secure)
   */
@Test
public void constructorTest14() throws Fault {
    String name = "name_1";
    String value = "value_1";
    String path = "/acme";
    String domain = "y.x.foo.com";
    String comment = "cts test comment";
    int maxage = jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE;
    int version = 1;
    boolean secure = false;
    NewCookie nck14 = new NewCookie(name, value, path, domain, version, comment, maxage, secure);
    verifyNewCookie(nck14, name, value, path, domain, version, comment, maxage, secure);
}
Also used : NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Example 20 with NewCookie

use of jakarta.ws.rs.core.NewCookie in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method constructorTest13.

/*
   * @testName: constructorTest13
   * 
   * @assertion_ids: JAXRS:JAVADOC:106; JAXRS:JAVADOC:100; JAXRS:JAVADOC:101;
   * JAXRS:JAVADOC:103; JAXRS:JAVADOC:53; JAXRS:JAVADOC:54; JAXRS:JAVADOC:55;
   * JAXRS:JAVADOC:56;
   * 
   * @test_Strategy: Create a NewCookie instance using constructor
   * NewCookie(java.lang.String name, java.lang.String value, java.lang.String
   * path, java.lang.String domain, int version, java.lang.String comment, int
   * maxAge, boolean secure)
   */
@Test
public void constructorTest13() throws Fault {
    String name = "name_1";
    String value = "value_1";
    String path = "";
    String domain = "y.x.foo.com";
    String comment = "";
    int maxage = jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE;
    int version = 1;
    boolean secure = false;
    NewCookie nck13 = new NewCookie(name, value, path, domain, version, comment, maxage, secure);
    verifyNewCookie(nck13, name, value, path, domain, version, comment, maxage, secure);
}
Also used : NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Aggregations

NewCookie (jakarta.ws.rs.core.NewCookie)48 Test (org.junit.jupiter.api.Test)41 Cookie (jakarta.ws.rs.core.Cookie)20 Response (jakarta.ws.rs.core.Response)13 Path (jakarta.ws.rs.Path)4 ResponseBuilder (jakarta.ws.rs.core.Response.ResponseBuilder)4 GET (jakarta.ws.rs.GET)3 CacheControl (jakarta.ws.rs.core.CacheControl)3 Date (java.util.Date)3 ParamEntityWithFromString (ee.jakarta.tck.ws.rs.ee.rs.ParamEntityWithFromString)2 POST (jakarta.ws.rs.POST)2 IOException (java.io.IOException)2 Consumes (jakarta.ws.rs.Consumes)1 ProcessingException (jakarta.ws.rs.ProcessingException)1 Produces (jakarta.ws.rs.Produces)1 ClientRequestContext (jakarta.ws.rs.client.ClientRequestContext)1 ClientResponseContext (jakarta.ws.rs.client.ClientResponseContext)1 URISyntaxException (java.net.URISyntaxException)1