use of org.eclipse.xtend2.lib.StringConcatenation in project applause by applause.
the class EntityGeneratorGeneratingEntitiesSimpleEntitiesSpec 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);
}
use of org.eclipse.xtend2.lib.StringConcatenation 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.eclipse.xtend2.lib.StringConcatenation in project applause by applause.
the class ParserTest method parseDomainModel.
@Test
public void parseDomainModel() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("datatype String");
_builder.newLine();
_builder.append("datatype Integer");
_builder.newLine();
final Model model = this.parser.parse(_builder);
EList<NamedElement> _elements = model.getElements();
NamedElement _head = IterableExtensions.<NamedElement>head(_elements);
final DataType dtString = ((DataType) _head);
String _name = dtString.getName();
Assert.assertEquals("String", _name);
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtend2.lib.StringConcatenation 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.eclipse.xtend2.lib.StringConcatenation 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");
}
Aggregations