All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opengis.cite.iso19142.versioning.FeatureVersioning Maven / Gradle / Ivy

There is a newer version: 2.0-r18
Show newest version
package org.opengis.cite.iso19142.versioning;

import org.opengis.cite.iso19142.ErrorMessage;
import org.opengis.cite.iso19142.ErrorMessageKeys;
import org.opengis.cite.iso19142.SuiteAttribute;
import org.opengis.cite.iso19142.util.ServiceMetadataUtils;
import org.testng.ITestContext;
import org.testng.SkipException;
import org.testng.annotations.BeforeTest;
import org.w3c.dom.Document;

/**
 * Checks preconditions for running tests to verify that the IUT satisfies the
 * requirements of the Feature versions conformance class. All
 * tests are skipped if any preconditions are not met. The implementation
 * constraints {@value #IMPL_FEATURE_VERSIONING} and {@value #IMPL_VERSION_NAV}
 * (FES) must be set to "TRUE" in the capabilities document.
 * 
 * 
 * {@code
 * 
 *   
 *     
 *       TRUE
 *     
 *   
 * 
 * }
 * 
* * @see ATC * A.1.14: Feature versions */ public class FeatureVersioning { public final static String IMPL_FEATURE_VERSIONING = "ImplementsFeatureVersioning"; public final static String IMPL_VERSION_NAV = "ImplementsVersionNav"; /** * This {@literal @BeforeTest} configuration method checks the * implementation status of the {@value #IMPL_FEATURE_VERSIONING} and * {@value #IMPL_VERSION_NAV} (FES) conformance classes. * * @param testContext * Information about the test run environment. */ @BeforeTest public void implementsFeatureVersioning(ITestContext testContext) { Document wfsMetadata = (Document) testContext.getSuite().getAttribute(SuiteAttribute.TEST_SUBJECT.getName()); if (!ServiceMetadataUtils.implementsConformanceClass(wfsMetadata, IMPL_FEATURE_VERSIONING)) { throw new SkipException(ErrorMessage.format(ErrorMessageKeys.NOT_IMPLEMENTED, IMPL_FEATURE_VERSIONING)); } if (!ServiceMetadataUtils.implementsConformanceClass(wfsMetadata, IMPL_FEATURE_VERSIONING)) { throw new SkipException(ErrorMessage.format(ErrorMessageKeys.NOT_IMPLEMENTED, IMPL_FEATURE_VERSIONING)); } if (!ServiceMetadataUtils.implementsConformanceClass(wfsMetadata, IMPL_VERSION_NAV)) { throw new SkipException(ErrorMessage.format(ErrorMessageKeys.NOT_IMPLEMENTED, IMPL_VERSION_NAV)); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy