Search in sources :

Example 21 with Order

use of org.jnario.runner.Order in project applause by applause.

the class EntityDataAccessGeneratorGeneratingDataAccessCodeForEntitiesDataAccessCodeSpec 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 \"Person.h\"");
    _builder.newLine();
    _builder.newLine();
    _builder.append("@interface Person (DataAccess)");
    _builder.newLine();
    _builder.append("+ (void)allPersons:(void (^)(NSArray *persons, NSError *error))block;");
    _builder.newLine();
    _builder.append("- (void)create:(void (^)(Person *person, NSError *error))block;");
    _builder.newLine();
    _builder.append("- (void)update:(void (^)(Person *person, NSError *error))block;");
    _builder.newLine();
    _builder.append("- (void)remove:(void (^)(Person *person, NSError *error))block;");
    _builder.newLine();
    _builder.append("@end");
    _builder.newLine();
    this.isGeneratedHeaderFileFromModel(_builder, "PersonDataSource", this.simpleDataSource);
}
Also used : StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Order(org.jnario.runner.Order) Named(org.jnario.runner.Named) Test(org.junit.Test)

Example 22 with Order

use of org.jnario.runner.Order in project applause by applause.

the class EntityDataMappingGeneratorMappingEntitiesDataMappingCodeSpec 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 \"Person.h\"");
    _builder.newLine();
    _builder.newLine();
    _builder.append("@interface Person (DataMapping)");
    _builder.newLine();
    _builder.append("- (id)initWithAttributes:(NSDictionary *)attributes;");
    _builder.newLine();
    _builder.newLine();
    _builder.append("- (NSDictionary *)attributes;");
    _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 23 with Order

use of org.jnario.runner.Order in project applause by applause.

the class EntityGeneratorGeneratingEntitiesSimpleEntitiesSpec 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("@interface Person : NSObject");
    _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 24 with Order

use of org.jnario.runner.Order in project applause by applause.

the class EntityGeneratorGeneratingEntityAttributesSimpleAttributesSpec 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("@interface Person : NSObject");
    _builder.newLine();
    _builder.append("@property (nonatomic, strong) NSString *name;");
    _builder.newLine();
    _builder.append("@property (nonatomic) BOOL grownUp;");
    _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 25 with Order

use of org.jnario.runner.Order in project applause by applause.

the class EntityGeneratorGeneratingEntityAttributesSimpleAttributesSpec method _implementationFile.

/**
   * @filter('''|.isGenerated.*)
   */
@Test
@Named("Implementation file")
@Order(2)
public void _implementationFile() throws Exception {
    StringConcatenation _builder = new StringConcatenation();
    _builder.append("#import \"Person.h\"");
    _builder.newLine();
    _builder.newLine();
    _builder.append("@implementation Person");
    _builder.newLine();
    _builder.append("@end");
    _builder.newLine();
    this.isGeneratedModuleFileFromModel(_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)

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