Package javax.resource.cci

Examples of javax.resource.cci.Record


    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator generator = mock(RecordCreator.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    given(connectionFactory.getRecordFactory()).willReturn(recordFactory);
    given(connectionFactory.getConnection()).willReturn(connection);
View Full Code Here


    Interaction interaction = mock(Interaction.class);
    RecordCreator generator = mock(RecordCreator.class);
    RecordExtractor<Object> extractor = mock(RecordExtractor.class);
    RecordCreator creator = mock(RecordCreator.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);

    Object obj = new Object();

    InteractionSpec interactionSpec = mock(InteractionSpec.class);
View Full Code Here

    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator generator = mock(RecordCreator.class);
    RecordExtractor<Object> extractor = mock(RecordExtractor.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    given(connectionFactory.getRecordFactory()).willReturn(recordFactory);
    given(connectionFactory.getConnection()).willReturn(connection);
View Full Code Here

    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    ConnectionSpec connectionSpec = mock(ConnectionSpec.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    given(connectionFactory.getConnection(connectionSpec)).willReturn(connection);
    given(connection.createInteraction()).willReturn(interaction);
View Full Code Here

      throws ResourceException, SQLException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    RecordFactory recordFactory = mock(RecordFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    Record record = mock(Record.class);
    ResultSet resultset = mock(ResultSet.class);
    RecordCreator generator = mock(RecordCreator.class);
    RecordExtractor<Object> extractor = mock(RecordExtractor.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);
View Full Code Here

    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    RecordCreator creator = mock(RecordCreator.class);

    Record inputOutputRecord = mock(Record.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    given(connectionFactory.getConnection()).willReturn(connection);
    given(connection.createInteraction()).willReturn(interaction);
View Full Code Here

  @Test
  public void testTemplateExecuteInputTrueTrue() throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    Record inputOutputRecord = mock(Record.class);
    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    given(connectionFactory.getConnection()).willReturn(connection);
    given(connection.createInteraction()).willReturn(interaction);
    given(interaction.execute(interactionSpec, inputOutputRecord, inputOutputRecord)).willReturn(true);
View Full Code Here

  @Test
  public void testTemplateExecuteInputFalseTrue() throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);
    Record inputOutputRecord = mock(Record.class);
    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    given(connectionFactory.getConnection()).willReturn(connection);
    given(connection.createInteraction()).willReturn(interaction);
    given(interaction.execute(interactionSpec, inputOutputRecord)).willReturn(null);

    CciTemplate ct = new CciTemplate(connectionFactory);
    Record tmpOutputRecord = ct.execute(interactionSpec,
        inputOutputRecord);
    assertNull(tmpOutputRecord);

    verify(interaction).execute(interactionSpec, inputOutputRecord);
    verify(interaction).close();
View Full Code Here

  public void testSimpleRecordOperation() throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    SimpleRecordOperation query = new SimpleRecordOperation(connectionFactory, interactionSpec);
View Full Code Here

  public void testSimpleRecordOperationWithExplicitOutputRecord() throws ResourceException {
    ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
    Connection connection = mock(Connection.class);
    Interaction interaction = mock(Interaction.class);

    Record inputRecord = mock(Record.class);
    Record outputRecord = mock(Record.class);

    InteractionSpec interactionSpec = mock(InteractionSpec.class);

    SimpleRecordOperation operation = new SimpleRecordOperation(connectionFactory, interactionSpec);
View Full Code Here

TOP

Related Classes of javax.resource.cci.Record

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.