Search in sources :

Example 1 with StringBeanEntityProvider

use of ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method closeOnWebTargetRegisterObjectWithContractsTest.

/*
   * @testName: closeOnWebTargetRegisterObjectWithContractsTest
   * 
   * @assertion_ids: JAXRS:JAVADOC:409;
   * 
   * @test_Strategy: Close client instance and all it's associated resources.
   * Subsequent calls have no effect and are ignored. Once the client is closed,
   * invoking any other method on the client instance would result in an
   * IllegalStateException being thrown. Calling this method effectively
   * invalidates all WebTarget resource targets produced by the client instance.
   * Invoking any method on such targets once the client is closed would result
   * in an IllegalStateException being thrown.
   */
@Test
public void closeOnWebTargetRegisterObjectWithContractsTest() throws Fault {
    client.close();
    assertException(IllegalStateException.class, target, "register", new StringBeanEntityProvider(), new Class[] { MessageBodyReader.class });
}
Also used : StringBeanEntityProvider(ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider) Test(org.junit.jupiter.api.Test)

Example 2 with StringBeanEntityProvider

use of ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method closeOnClientRegisterObjectWithPriorityTest.

/*
   * @testName: closeOnClientRegisterObjectWithPriorityTest
   * 
   * @assertion_ids: JAXRS:JAVADOC:409;
   * 
   * @test_Strategy: Close client instance and all it's associated resources.
   * Subsequent calls have no effect and are ignored. Once the client is closed,
   * invoking any other method on the client instance would result in an
   * IllegalStateException being thrown. Calling this method effectively
   * invalidates all WebTarget resource targets produced by the client instance.
   * Invoking any method on such targets once the client is closed would result
   * in an IllegalStateException being thrown.
   */
@Test
public void closeOnClientRegisterObjectWithPriorityTest() throws Fault {
    client.close();
    assertException(IllegalStateException.class, client, "register", new StringBeanEntityProvider(), 100);
}
Also used : StringBeanEntityProvider(ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider) Test(org.junit.jupiter.api.Test)

Example 3 with StringBeanEntityProvider

use of ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method closeOnWebTargetRegisterObjectWithPriorityTest.

/*
   * @testName: closeOnWebTargetRegisterObjectWithPriorityTest
   * 
   * @assertion_ids: JAXRS:JAVADOC:409;
   * 
   * @test_Strategy: Close client instance and all it's associated resources.
   * Subsequent calls have no effect and are ignored. Once the client is closed,
   * invoking any other method on the client instance would result in an
   * IllegalStateException being thrown. Calling this method effectively
   * invalidates all WebTarget resource targets produced by the client instance.
   * Invoking any method on such targets once the client is closed would result
   * in an IllegalStateException being thrown.
   */
@Test
public void closeOnWebTargetRegisterObjectWithPriorityTest() throws Fault {
    client.close();
    assertException(IllegalStateException.class, target, "register", new StringBeanEntityProvider(), 100);
}
Also used : StringBeanEntityProvider(ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider) Test(org.junit.jupiter.api.Test)

Example 4 with StringBeanEntityProvider

use of ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method closeOnClientRegisterObjectTest.

/*
   * @testName: closeOnClientRegisterObjectTest
   * 
   * @assertion_ids: JAXRS:JAVADOC:409;
   * 
   * @test_Strategy: Close client instance and all it's associated resources.
   * Subsequent calls have no effect and are ignored. Once the client is closed,
   * invoking any other method on the client instance would result in an
   * IllegalStateException being thrown. Calling this method effectively
   * invalidates all WebTarget resource targets produced by the client instance.
   * Invoking any method on such targets once the client is closed would result
   * in an IllegalStateException being thrown.
   */
@Test
public void closeOnClientRegisterObjectTest() throws Fault {
    client.close();
    assertException(IllegalStateException.class, client, "register", new StringBeanEntityProvider());
}
Also used : StringBeanEntityProvider(ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider) Test(org.junit.jupiter.api.Test)

Example 5 with StringBeanEntityProvider

use of ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider in project jaxrs-api by eclipse-ee4j.

the class JAXRSClientIT method closeOnWebTargetRegisterObjectTest.

/*
   * @testName: closeOnWebTargetRegisterObjectTest
   * 
   * @assertion_ids: JAXRS:JAVADOC:409;
   * 
   * @test_Strategy: Close client instance and all it's associated resources.
   * Subsequent calls have no effect and are ignored. Once the client is closed,
   * invoking any other method on the client instance would result in an
   * IllegalStateException being thrown. Calling this method effectively
   * invalidates all WebTarget resource targets produced by the client instance.
   * Invoking any method on such targets once the client is closed would result
   * in an IllegalStateException being thrown.
   */
@Test
public void closeOnWebTargetRegisterObjectTest() throws Fault {
    client.close();
    assertException(IllegalStateException.class, target, "register", new StringBeanEntityProvider());
}
Also used : StringBeanEntityProvider(ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider) Test(org.junit.jupiter.api.Test)

Aggregations

StringBeanEntityProvider (ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider)10 Test (org.junit.jupiter.api.Test)10 JAXRSCommonClient (ee.jakarta.tck.ws.rs.common.JAXRSCommonClient)2 Client (jakarta.ws.rs.client.Client)2 HashMap (java.util.HashMap)2 WebTarget (jakarta.ws.rs.client.WebTarget)1 Configuration (jakarta.ws.rs.core.Configuration)1 Feature (jakarta.ws.rs.core.Feature)1 FeatureContext (jakarta.ws.rs.core.FeatureContext)1