Search in sources :

Example 16 with Named

use of org.jnario.runner.Named 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);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Order(org.jnario.runner.Order) Named(org.jnario.runner.Named) Test(org.junit.Test)

Example 17 with Named

use of org.jnario.runner.Named 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);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Order(org.jnario.runner.Order) Named(org.jnario.runner.Named) Test(org.junit.Test)

Example 18 with Named

use of org.jnario.runner.Named 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");
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Order(org.jnario.runner.Order) Named(org.jnario.runner.Named) Test(org.junit.Test)

Example 19 with Named

use of org.jnario.runner.Named 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);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Order(org.jnario.runner.Order) Named(org.jnario.runner.Named) Test(org.junit.Test)

Example 20 with Named

use of org.jnario.runner.Named 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);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Order(org.jnario.runner.Order) Named(org.jnario.runner.Named) Test(org.junit.Test)

Aggregations

StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)35 Named (org.jnario.runner.Named)35 Order (org.jnario.runner.Order)35 Test (org.junit.Test)35