Package org.opengis.cite.iso19142.transaction

# Class TransactionFixture

java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.transaction.TransactionFixture

Direct Known Subclasses:
  `DeleteTests`, `InsertTests`, `ReplaceTests`, `Update`

public class TransactionFixture extends BaseFixture
Provides configuration methods that facilitate testing of transaction capabilities.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected DataSampler`
  `dataSampler`
  `protected org.apache.xerces.xs.XSModel`
  `model`
  An XSModel object representing the application schema supported by the SUT.

  ### Fields inherited from class org.opengis.cite.iso19142.BaseFixture

  `docBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TransactionFixture()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `buildTransactionRequest()`
  Builds a DOM Document representing a Transaction request entity.
  `void`
  `initTransactionFixture(org.testng.ITestContext testContext)`
  Obtains a DataSampler object from the test run context (the value of the `SuiteAttribute.SAMPLER attribute`).
  `(package private) void`
  `setModel(org.apache.xerces.xs.XSModel model)`
  This is intended only to facilitate unit testing.
  `Iterator<Object[]>`
  `trxTestParameters(org.testng.ITestContext testContext)`
  A DataProvider that supplies a collection of parameter tuples where each tuple has two elements: ProtocolBinding - a supported transaction request binding QName - the name of a feature type for which data are available

  ### Methods inherited from class org.opengis.cite.iso19142.BaseFixture

  `addAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClient`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### dataSampler

    protected DataSampler dataSampler

  - ### model

    protected org.apache.xerces.xs.XSModel model
    An XSModel object representing the application schema supported by the SUT.

- ## Constructor Details

  - ### TransactionFixture

    public TransactionFixture()

- ## Method Details

  - ### setModel

    void setModel(org.apache.xerces.xs.XSModel model)
    This is intended only to facilitate unit testing.
    Parameters:
      `model` - A representation of an application schema.

  - ### initTransactionFixture

    @BeforeClass(alwaysRun=true) public void initTransactionFixture(org.testng.ITestContext testContext)
    Obtains a DataSampler object from the test run context (the value of the `SuiteAttribute.SAMPLER attribute`). A schema model (XSModel) is also obtained from the test context by accessing the `xsmodel` attribute.
    Parameters:
      `testContext` - The test run context.

  - ### buildTransactionRequest

    @BeforeMethod public void buildTransactionRequest()
    Builds a DOM Document representing a Transaction request entity.

  - ### trxTestParameters

    @DataProvider(name="binding+availFeatureType") public Iterator<Object[]> trxTestParameters(org.testng.ITestContext testContext)
    A DataProvider that supplies a collection of parameter tuples where each tuple has two elements:
    1. ProtocolBinding - a supported transaction request binding
    2. QName - the name of a feature type for which data are available
    Parameters:
      `testContext` - The ITestContext object for the test run.
    Returns:
      Iterator<Object[]> An iterator over a collection of parameter tuples.