OTX Reference  
OpenTestSystem.Otx.Extensions.DataType.DataTypes.ResourceLocation Class Reference

ResourceLocation is an otx:SimpleType. More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.DataType.DataTypes.ResourceLocation:
Inheritance graph

Public Attributes

ResourceLocationLiteral init
 This optional element represents the hard-coded value from which the declared resource shall be created.It includes an Id which uniquely identifies the resource and an optional default path which is used, if no path was mapped and an optional descrption of the resource type. More...
 

Detailed Description

ResourceLocation is an otx:SimpleType.

In some use cases, an OTX sequence needs to address certain resources, e.g. XML files, text documents, pictures etc. If this is the case, each resource have to be addressable by a location. The location itself will not be part of the test logic, because it can be different in different runtime environments. A ResourceLocation represents a string value which addresses a location of a resource associated with an ID.At runtime it can be mapped via an appropriate mapping mechanism to a real address.If the related resource ID cannot be mapped, because a possible mapping table does not contain the ID or the runtime does not support a mapping mechanism, the location is the default location.If no default location is specified, the location is an empty string.

Note
IMPORTANT - The mapping mechanism is not part of the standard.

When applied to a ResourceLocation, the otx:ToString term will return the location of the ResourceLocation.

Literal
The syntax for Literals for complex data types will be used, where the member value is one of the values in the list.

@ResourceLocation:"ID_1"/"file:///D:/file_sample.txt"


Sample

DataType.ResourceLocation ResourceLocation1 = @ResourceLocation:"ID_1"/"file:///D:/file_sample.txt";

Member Data Documentation

◆ init

ResourceLocationLiteral OpenTestSystem.Otx.Extensions.DataType.DataTypes.ResourceLocation.init

This optional element represents the hard-coded value from which the declared resource shall be created.It includes an Id which uniquely identifies the resource and an optional default path which is used, if no path was mapped and an optional descrption of the resource type.

Note
IMPORTANT - If the ResourceLocation declaration is not explicitly initialised (omitted <init> element), the default path shall be an empty string.