use of org.jnario.runner.Order in project applause by applause.
the class ScalarDataTypesDefiningDataTypesSpec method _dataTypesMustBeUnique.
/**
* Data types must be unique. Currently, this means they must be unique across the board and __cannot__
* be namespaced.
* @filter('''|.hasDuplicateDatatype)
*/
@Test
@Named("Data types must be unique")
@Order(2)
public void _dataTypesMustBeUnique() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("datatype String");
_builder.newLine();
_builder.append("datatype String // <-- invalid");
_builder.newLine();
this._scalarDataTypesValidationTestHelper.hasDuplicateDatatype(_builder);
}
use of org.jnario.runner.Order in project applause by applause.
the class ScalarDataTypesPlatformMappingSpec method _aDataTypeCanBeMappedToATypeInTheTargetLanguage.
/**
* This makes sense when you want to support multiple platforms. This way, you can use the
* platform-independent data type name and do not need to care about what's the right type
* on the target platform.
* @filter('''|.hasPlatformTypeMapping.*)
*/
@Test
@Named("A data type can be mapped to a type in the target language")
@Order(2)
public void _aDataTypeCanBeMappedToATypeInTheTargetLanguage() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("datatype String");
_builder.newLine();
_builder.append("platform iOS {");
_builder.newLine();
_builder.append("\t");
_builder.append("typemapping String -> NSString");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._scalarDataTypesValidationTestHelper.hasPlatformTypeMapping(_builder, "String", "NSString");
}
use of org.jnario.runner.Order in project applause by applause.
the class ScreensDefiningScreensSpec method _simpleScreens.
/**
* Screens can be defined using the `screen` keyword. A screen can either be a list screen or a details screen,
* which is indicated by either specifying `DefaultList` or `DefaultDetails`. Each screen is identified by its name,
* which needs to be unique.
* @filter('''|.valid.*)
*/
@Test
@Named("Simple screens")
@Order(1)
public void _simpleScreens() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("screen DefaultList PersonList {");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("screen DefaultDetails PersonDetails {");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._screensValidationTestHelper.isValidScreen(_builder);
}
use of org.jnario.runner.Order in project applause by applause.
the class PlistGeneratorPlistFileSpec method _plistFile.
/**
* @filter('''|.isGenerated.*)
*/
@Test
@Named("Plist file")
@Order(1)
public void _plistFile() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
_builder.newLine();
_builder.append("<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">");
_builder.newLine();
_builder.append("<plist version=\"1.0\">");
_builder.newLine();
_builder.append("<dict>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleDevelopmentRegion</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>en</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleDisplayName</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>${PRODUCT_NAME}</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleExecutable</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>${EXECUTABLE_NAME}</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleIdentifier</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>org.applause.${PRODUCT_NAME:rfc1034identifier}</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleInfoDictionaryVersion</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>6.0</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleName</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>${PRODUCT_NAME}</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundlePackageType</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>APPL</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleShortVersionString</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>1.0</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleSignature</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>????</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>CFBundleVersion</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<string>1.0</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>LSRequiresIPhoneOS</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<true/>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>UIRequiredDeviceCapabilities</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<array>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<string>armv7</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("</array>");
_builder.newLine();
_builder.append("\t");
_builder.append("<key>UISupportedInterfaceOrientations</key>");
_builder.newLine();
_builder.append("\t");
_builder.append("<array>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<string>UIInterfaceOrientationPortrait</string>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<string>UIInterfaceOrientationLandscapeLeft</string>");
_builder.newLine();
_builder.append("\t\t");
_builder.append("<string>UIInterfaceOrientationLandscapeRight</string>");
_builder.newLine();
_builder.append("\t");
_builder.append("</array>");
_builder.newLine();
_builder.append("</dict>");
_builder.newLine();
_builder.append("</plist>");
_builder.newLine();
this.isGeneratedModuleFile(_builder);
}
use of org.jnario.runner.Order in project applause by applause.
the class EntitiesDefiningEntitiesSpec method _abstractEntities.
/**
* If an entity is merely used to specify base attributes for an inheritance hierarchy,
* it makes sense to define it as being abstract to make sure it cannot be instantiated.
* @filter('''|isValid.*)
*/
@Test
@Named("Abstract Entities")
@Order(4)
public void _abstractEntities() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("abstract entity Person {");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("entity Employee extends Person {");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._entitiesValidationTestHelper.isValidAbstractEntityWithInheritance(_builder);
}
Aggregations