use of org.jnario.runner.Order in project applause by applause.
the class EntityGeneratorGeneratingEntitiesEntityInheritanceSpec method _headerFile.
/**
* @filter('''|.isGenerated.*)
*/
@Test
@Named("Header File")
@Order(1)
public void _headerFile() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("#import <Foundation/Foundation.h>");
_builder.newLine();
_builder.newLine();
_builder.append("@class Creature;");
_builder.newLine();
_builder.newLine();
_builder.append("@interface Person : Creature");
_builder.newLine();
_builder.append("@end");
_builder.newLine();
this.isGeneratedHeaderFileFromModel(_builder, "Person", this.inheritedPersonEntity);
}
use of org.jnario.runner.Order in project applause by applause.
the class APIClientGeneratorEntityAPIClientAPIClientCodeSpec method _headerFile.
/**
* @filter('''|.isGenerated.*)
*/
@Test
@Named("Header File")
@Order(1)
public void _headerFile() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("#import <Foundation/Foundation.h>");
_builder.newLine();
_builder.append("#import \"AFHTTPSessionManager.h\"");
_builder.newLine();
_builder.newLine();
_builder.append("@interface PersonAPIClient : AFHTTPSessionManager");
_builder.newLine();
_builder.append("+ (PersonAPIClient *)sharedClient;");
_builder.newLine();
_builder.append("@end");
_builder.newLine();
this.isGeneratedHeaderFileFromModel(_builder, "Person", this.simplePersonEntity);
}
use of org.jnario.runner.Order in project applause by applause.
the class ScalarDataTypesPlatformMappingSpec method _definingPlatforms.
/**
* The `platform` keyword can be used to define a platform.
* @filter('''|.hasPlatform.*)
*/
@Test
@Named("Defining platforms")
@Order(1)
public void _definingPlatforms() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("platform iOS {");
_builder.newLine();
_builder.append("\t");
_builder.append("// platform-specific configurations");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._scalarDataTypesValidationTestHelper.hasPlatform(_builder, "iOS");
}
use of org.jnario.runner.Order in project applause by applause.
the class ScreensDefiningScreensSpec method _screensMustBeUnique.
/**
* Screens must be unique. Currently, this means they must be unique across the board and __cannot__
* be namespaced.
* @filter('''|.hasDuplicateScreen)
*/
@Test
@Named("Screens must be unique")
@Order(2)
public void _screensMustBeUnique() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("screen DefaultList PersonList {");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("screen DefaultList PersonList {");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._screensValidationTestHelper.hasDuplicateScreen(_builder);
}
use of org.jnario.runner.Order in project applause by applause.
the class ScreensDefiningScreensSpec method _screensCanHaveAnOptionalDataSource.
/**
* Screens can be linked to a data source, which can then be used to fetch data to be displayed on the screen.
* @filter('''|hasDataSource.*)
*/
@Test
@Named("Screens can have an optional data source")
@Order(4)
public void _screensCanHaveAnOptionalDataSource() throws Exception {
StringConcatenation _builder = new StringConcatenation();
_builder.append("entity Person {}");
_builder.newLine();
_builder.append("datasource PersonDataSource {");
_builder.newLine();
_builder.append("\t");
_builder.append("baseUrl: http://localhost/persons");
_builder.newLine();
_builder.append("\t");
_builder.append("resource: Person");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.append("screen DefaultList PersonList {");
_builder.newLine();
_builder.append("\t");
_builder.append("title = \"Persons\"");
_builder.newLine();
_builder.append("\t");
_builder.append("datasource = PersonDataSource");
_builder.newLine();
_builder.append("}");
_builder.newLine();
this._screensValidationTestHelper.hasDataSource(_builder);
}
Aggregations