Search in sources :

Example 31 with NewCookie

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

the class JAXRSClientIT method constructorTest8.

/*
   * @testName: constructorTest8
   * 
   * @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 constructorTest8() 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 nck8 = new NewCookie(name, value, path, domain, comment, maxage, secure);
    verifyNewCookie(nck8, name, value, path, domain, version, comment, maxage, secure);
}
Also used : NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Example 32 with NewCookie

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

the class JAXRSClientIT method constructorTest16.

/*
   * @testName: constructorTest16
   * 
   * @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 constructorTest16() throws Fault {
    // ToDo: Create a list of name, value, path, domain
    String name = "name_1";
    String value = "value_1";
    String path = "/acme";
    String domain = "y.x.foo.com";
    int version = 0;
    String comment = "cts test comment";
    int maxage = jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE;
    boolean secure = true;
    NewCookie nck16 = new NewCookie(name, value, path, domain, version, comment, maxage, secure);
    verifyNewCookie(nck16, name, value, path, domain, version, comment, maxage, secure);
}
Also used : NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Example 33 with NewCookie

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

the class JAXRSClientIT method constructorTest10.

/*
   * @testName: constructorTest10
   * 
   * @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 version 1 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 constructorTest10() 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 = jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE;
    boolean secure = true;
    NewCookie nck10 = new NewCookie(name, value, path, domain, comment, maxage, secure);
    verifyNewCookie(nck10, name, value, path, domain, version, comment, maxage, secure);
}
Also used : NewCookie(jakarta.ws.rs.core.NewCookie) Test(org.junit.jupiter.api.Test)

Example 34 with NewCookie

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

the class JAXRSClientIT method constructorTest25.

/*
   * @testName: constructorTest25
   * 
   * @assertion_ids: JAXRS:JAVADOC:108; JAXRS:JAVADOC:100; JAXRS:JAVADOC:101;
   * JAXRS:JAVADOC:103; JAXRS:JAVADOC:49; JAXRS:JAVADOC:53; JAXRS:JAVADOC:54;
   * JAXRS:JAVADOC:55; JAXRS:JAVADOC:56;
   * 
   * @test_Strategy: Create a version 1 NewCookie instance using constructor
   * Cookie(String, String, String, String, int) NewCookie(Cookie, String
   * comment, int maxAge, boolean secure)
   */
@Test
public void constructorTest25() 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;
    Cookie ck25 = new Cookie(name, value, path, domain, version);
    NewCookie nck25 = new NewCookie(ck25, comment, maxage, secure);
    verifyNewCookie(nck25, 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 35 with NewCookie

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

the class JAXRSClientIT method constructorTest24.

/*
   * @testName: constructorTest24
   * 
   * @assertion_ids: JAXRS:JAVADOC:108; JAXRS:JAVADOC:100; JAXRS:JAVADOC:101;
   * JAXRS:JAVADOC:103; JAXRS:JAVADOC:49; JAXRS:JAVADOC:53; JAXRS:JAVADOC:54;
   * JAXRS:JAVADOC:55; JAXRS:JAVADOC:56;
   * 
   * @test_Strategy: Create a version 1 NewCookie instance using constructor
   * Cookie(String, String, String, String, int) NewCookie(Cookie, String
   * comment, int maxAge, boolean secure)
   */
@Test
public void constructorTest24() 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 = jakarta.ws.rs.core.NewCookie.DEFAULT_MAX_AGE;
    boolean secure = true;
    Cookie ck24 = new Cookie(name, value, path, domain, version);
    NewCookie nck24 = new NewCookie(ck24, comment, maxage, secure);
    verifyNewCookie(nck24, 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)

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