Search in sources :

Example 16 with Product

use of org.jboss.pnc.dto.Product in project pnc by project-ncl.

the class ProductEndpointTest method testGetAll.

@Test
@InSequence(10)
public void testGetAll() throws RemoteResourceException {
    ProductClient client = new ProductClient(RestClientConfiguration.asAnonymous());
    RemoteCollection<Product> all = client.getAll();
    // from DatabaseDataInitializer
    assertThat(all).hasSize(1);
}
Also used : ProductClient(org.jboss.pnc.client.ProductClient) Product(org.jboss.pnc.dto.Product) ContainerTest(org.jboss.pnc.test.category.ContainerTest) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 17 with Product

use of org.jboss.pnc.dto.Product in project pnc by project-ncl.

the class ProductEndpointTest method testGetSpecific.

@Test
public void testGetSpecific() throws ClientException {
    ProductClient client = new ProductClient(RestClientConfiguration.asAnonymous());
    Product dto = client.getSpecific(productId);
    // from DatabaseDataInitializer
    assertThat(dto.getName()).isEqualTo("Project Newcastle Demo Product");
    // from
    assertThat(dto.getDescription()).isEqualTo("Example Product for Project Newcastle Demo");
// DatabaseDataInitializer
}
Also used : ProductClient(org.jboss.pnc.client.ProductClient) Product(org.jboss.pnc.dto.Product) ContainerTest(org.jboss.pnc.test.category.ContainerTest) Test(org.junit.Test)

Aggregations

Product (org.jboss.pnc.dto.Product)17 ProductClient (org.jboss.pnc.client.ProductClient)10 ContainerTest (org.jboss.pnc.test.category.ContainerTest)9 Test (org.junit.Test)9 AbstractTest (org.jboss.pnc.bacon.test.AbstractTest)5 Order (org.junit.jupiter.api.Order)5 Test (org.junit.jupiter.api.Test)5 TestMethodOrder (org.junit.jupiter.api.TestMethodOrder)5 InSequence (org.jboss.arquillian.junit.InSequence)4 ClientException (org.jboss.pnc.client.ClientException)4 ProductVersion (org.jboss.pnc.dto.ProductVersion)3 ProductVersionClient (org.jboss.pnc.client.ProductVersionClient)2 ProductMilestone (org.jboss.pnc.dto.ProductMilestone)2 IOException (java.io.IOException)1 Path (java.nio.file.Path)1 Instant (java.time.Instant)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Optional (java.util.Optional)1 BadRequestException (javax.ws.rs.BadRequestException)1