Search in sources :

Example 91 with InSequence

use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.

the class WSTestCase method testAccess.

@Test
@InSequence(4)
public void testAccess() throws Exception {
    URL wsdlURL = new URL(this.url.toExternalForm() + "ws-example?wsdl");
    QName serviceName = new QName("http://webservices.smoke.test.as.jboss.org/", "EndpointService");
    Service service = Service.create(wsdlURL, serviceName);
    Endpoint port = (Endpoint) service.getPort(Endpoint.class);
    String echo = port.echo("Foo");
    assertThat("Echoing Foo should return Foo not " + echo, echo, is("Foo"));
}
Also used : QName(javax.xml.namespace.QName) Service(javax.xml.ws.Service) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) URL(java.net.URL) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 92 with InSequence

use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.

the class LookupTestCase method testServerLocalLookup.

@Test
@OperateOnDeployment("test")
@InSequence(1)
public void testServerLocalLookup() throws Exception {
    InitialContext context = new InitialContext();
    lookupConnectionFactory(context, "java:jboss/exported/jms/RemoteConnectionFactory");
    context.close();
}
Also used : InitialContext(javax.naming.InitialContext) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 93 with InSequence

use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.

the class ImplementValidityAuditStrategyTestCase method testValidityStrategyActivationforEnvers.

@Test
@InSequence(2)
public void testValidityStrategyActivationforEnvers() throws Exception {
    SLSBValidityStrategyOrg slsbvalidityOrg = lookup("SLSBValidityStrategyOrg", SLSBValidityStrategyOrg.class);
    Organization o1 = slsbvalidityOrg.createOrg("REDHAT", "Software Co", "10/10/1994", "eternity", "Raleigh");
    Organization o2 = slsbvalidityOrg.createOrg("HALDIRAMS", "Food Co", "10/10/1974", "eternity", "Delhi");
    o2.setStartDate("10/10/1924");
    o2.setName("BIKANER");
    slsbvalidityOrg.updateOrg(o2);
    // check if REV END Date is populated
    List<Map<String, Object>> orgHistory = slsbvalidityOrg.verifyEndRevision(new Integer(o2.getId()));
    for (Map<String, Object> revisionEntity : orgHistory) {
        Assert.assertNotNull(revisionEntity);
        Date revendTimestamp = (Date) revisionEntity.get("REVEND_VALIDITY");
        DefaultRevisionEntity revEnd = (DefaultRevisionEntity) revisionEntity.get("REVEND");
        if (revendTimestamp != null) {
            Assert.assertEquals(revendTimestamp.getTime(), revEnd.getTimestamp());
        }
    }
}
Also used : SLSBValidityStrategyOrg(org.jboss.as.test.integration.jpa.hibernate.envers.SLSBValidityStrategyOrg) Organization(org.jboss.as.test.integration.jpa.hibernate.envers.Organization) DefaultRevisionEntity(org.hibernate.envers.DefaultRevisionEntity) Map(java.util.Map) Date(java.util.Date) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 94 with InSequence

use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.

the class EntityTestCase method testOneToMany.

@Test
@InSequence(1)
public void testOneToMany() throws Exception {
    EntityTest test = lookup("EntityTest", EntityTest.class);
    Customer c = test.oneToManyCreate();
    assertNotNull(c);
    assertNotNull(c.getTickets());
    Set<Ticket> tickets = c.getTickets();
    assertTrue(tickets.size() > 0);
    assertNotNull(c);
    assertNotNull(c.getTickets());
    tickets = c.getTickets();
    assertTrue(tickets.size() > 0);
}
Also used : Ticket(org.jboss.as.test.integration.jpa.hibernate.entity.Ticket) Customer(org.jboss.as.test.integration.jpa.hibernate.entity.Customer) EntityTest(org.jboss.as.test.integration.jpa.hibernate.EntityTest) EntityTest(org.jboss.as.test.integration.jpa.hibernate.EntityTest) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Example 95 with InSequence

use of org.jboss.arquillian.junit.InSequence in project wildfly by wildfly.

the class EntityTestCase method testManyToMany.

@Test
@InSequence(3)
public void testManyToMany() throws Exception {
    EntityTest test = lookup("EntityTest", EntityTest.class);
    test.manyToManyCreate();
    Flight f1 = test.findFlightById(new Long(1));
    assertTrue("Name read from Hibernate is Airline 1", f1.getCompany().getName().equals("Airline 1"));
    Flight f2 = test.findFlightById(new Long(2));
    assertTrue("Name read from Hibernate is Airline 1", f2.getCompany().getName().equals("Airline 2"));
    assertEquals(1, f1.getCustomers().size());
    assertEquals(2, f2.getCustomers().size());
}
Also used : Flight(org.jboss.as.test.integration.jpa.hibernate.entity.Flight) EntityTest(org.jboss.as.test.integration.jpa.hibernate.EntityTest) EntityTest(org.jboss.as.test.integration.jpa.hibernate.EntityTest) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Aggregations

InSequence (org.jboss.arquillian.junit.InSequence)157 Test (org.junit.Test)157 Faker (com.github.javafaker.Faker)21 Simple (org.apache.deltaspike.data.test.ee7.domain.Simple)18 ModelNode (org.jboss.dmr.ModelNode)14 URL (java.net.URL)13 HttpResponse (org.apache.http.HttpResponse)10 TakeOffer (io.bisq.api.model.TakeOffer)9 HttpGet (org.apache.http.client.methods.HttpGet)8 ModelControllerClient (org.jboss.as.controller.client.ModelControllerClient)8 OfferToCreate (io.bisq.api.model.OfferToCreate)7 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)7 PartitionManager (org.picketlink.idm.PartitionManager)7 Response (javax.ws.rs.core.Response)6 IdentityManager (org.picketlink.idm.IdentityManager)6 StringTokenizer (java.util.StringTokenizer)5 RouteBuilder (org.apache.camel.builder.RouteBuilder)5 House (org.apache.deltaspike.data.test.ee7.domain.House)5 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)5 ManagementClient (org.jboss.as.arquillian.container.ManagementClient)5