Package org.applause.lang.applauseDsl

Examples of org.applause.lang.applauseDsl.Entity


  @org.jnario.runner.Extension
  public EntityDataMappingModuleFileCompiler _entityDataMappingModuleFileCompiler;
 
  private Entity entity(final CharSequence input, final String entityName) {
    try {
      Entity _xblockexpression = null;
      {
        final Model model = this._parseHelper.parse(input);
        EList<NamedElement> _elements = model.getElements();
        Iterable<Entity> _filter = Iterables.<Entity>filter(_elements, Entity.class);
        final Function1<Entity,Boolean> _function = new Function1<Entity,Boolean>() {
          public Boolean apply(final Entity it) {
            String _name = it.getName();
            boolean _equals = Objects.equal(_name, entityName);
            return Boolean.valueOf(_equals);
          }
        };
        Entity _findFirst = IterableExtensions.<Entity>findFirst(_filter, _function);
        _xblockexpression = (_findFirst);
      }
      return _xblockexpression;
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
View Full Code Here


      throw Exceptions.sneakyThrow(_e);
    }
  }
 
  public void isGeneratedHeaderFileFromModel(final CharSequence expectedGeneratedCode, final String entityName, final CharSequence input) {
    final Entity entity = this.entity(input, entityName);
    final CharSequence result = this._entityDataMappingHeaderFileCompiler.compileHeaderFile(entity);
    String _string = result.toString();
    String _string_1 = expectedGeneratedCode.toString();
    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
View Full Code Here

    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
  }
 
  public void isGeneratedModuleFileFromModel(final CharSequence expectedGeneratedCode, final String entityName, final CharSequence input) {
    final Entity entity = this.entity(input, entityName);
    final CharSequence result = this._entityDataMappingModuleFileCompiler.compileModuleFile(entity);
    String _string = result.toString();
    String _string_1 = expectedGeneratedCode.toString();
    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
View Full Code Here

    _builder.append("- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath");
    _builder.newLine();
    _builder.append("{");
    _builder.newLine();
    _builder.append("\t");
    Entity _resourceType = this._defaultListScreenClassExtensions.resourceType(it);
    String _typeName = this._typeExtensions.typeName(_resourceType);
    _builder.append(_typeName, "  ");
    _builder.append(" *item= self.items[indexPath.row];");
    _builder.newLineIfNotEmpty();
    _builder.append("\t");
    _builder.append("[item ");
    DataSourceAccessMethod _deleteMethod = this.deleteMethod(it);
    String _name = _deleteMethod.getName();
    _builder.append(_name, "  ");
    _builder.append(":^(");
    Entity _resourceType_1 = this._defaultListScreenClassExtensions.resourceType(it);
    String _typeName_1 = this._typeExtensions.typeName(_resourceType_1);
    _builder.append(_typeName_1, "  ");
    _builder.append(" *item, NSError *error)");
    _builder.newLineIfNotEmpty();
    _builder.append("\t");
View Full Code Here

  @org.jnario.runner.Extension
  public EntityModuleFileCompiler _entityModuleFileCompiler;
 
  private Entity entity(final CharSequence input, final String entityName) {
    try {
      Entity _xblockexpression = null;
      {
        final Model model = this._parseHelper.parse(input);
        EList<NamedElement> _elements = model.getElements();
        Iterable<Entity> _filter = Iterables.<Entity>filter(_elements, Entity.class);
        final Function1<Entity,Boolean> _function = new Function1<Entity,Boolean>() {
          public Boolean apply(final Entity it) {
            String _name = it.getName();
            boolean _equals = Objects.equal(_name, entityName);
            return Boolean.valueOf(_equals);
          }
        };
        Entity _findFirst = IterableExtensions.<Entity>findFirst(_filter, _function);
        _xblockexpression = (_findFirst);
      }
      return _xblockexpression;
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
View Full Code Here

      throw Exceptions.sneakyThrow(_e);
    }
  }
 
  public void isGeneratedHeaderFileFromModel(final CharSequence expectedGeneratedCode, final String entityName, final CharSequence input) {
    final Entity entity = this.entity(input, entityName);
    final CharSequence result = this._entityHeaderFileCompiler.compileHeader(entity);
    String _string = result.toString();
    String _string_1 = expectedGeneratedCode.toString();
    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
View Full Code Here

    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
  }
 
  public void isGeneratedModuleFileFromModel(final CharSequence expectedGeneratedCode, final String entityName, final CharSequence input) {
    final Entity entity = this.entity(input, entityName);
    final CharSequence result = this._entityModuleFileCompiler.compileModule(entity);
    String _string = result.toString();
    String _string_1 = expectedGeneratedCode.toString();
    Matcher<String> _equalTo = CoreMatchers.<String>equalTo(_string_1);
    Assert.<String>assertThat(_string, _equalTo);
View Full Code Here

  public void isValidEntity(final CharSequence sequence) {
    try {
      final Model model = this._parseHelper.parse(sequence);
      EList<NamedElement> _elements = model.getElements();
      NamedElement _head = IterableExtensions.<NamedElement>head(_elements);
      final Entity entity = ((Entity) _head);
      String _name = entity.getName();
      Assert.assertNotNull(_name);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

  public void isValidEntityWithInheritance(final CharSequence sequence) {
    try {
      final Model model = this._parseHelper.parse(sequence);
      EList<NamedElement> _elements = model.getElements();
      NamedElement _head = IterableExtensions.<NamedElement>head(_elements);
      final Entity person = ((Entity) _head);
      EList<NamedElement> _elements_1 = model.getElements();
      NamedElement _last = IterableExtensions.<NamedElement>last(_elements_1);
      final Entity employee = ((Entity) _last);
      Entity _superType = employee.getSuperType();
      Matcher<Entity> _is = CoreMatchers.<Entity>is(person);
      Assert.<Entity>assertThat(_superType, _is);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

  public void isValidAbstractEntityWithInheritance(final CharSequence sequence) {
    try {
      final Model model = this._parseHelper.parse(sequence);
      EList<NamedElement> _elements = model.getElements();
      NamedElement _head = IterableExtensions.<NamedElement>head(_elements);
      final Entity person = ((Entity) _head);
      EList<NamedElement> _elements_1 = model.getElements();
      NamedElement _last = IterableExtensions.<NamedElement>last(_elements_1);
      final Entity employee = ((Entity) _last);
      boolean _isAbstract = person.isAbstract();
      Matcher<Boolean> _is = CoreMatchers.<Boolean>is(Boolean.valueOf(true));
      Assert.<Boolean>assertThat(Boolean.valueOf(_isAbstract), _is);
      Entity _superType = employee.getSuperType();
      Matcher<Entity> _is_1 = CoreMatchers.<Entity>is(person);
      Assert.<Entity>assertThat(_superType, _is_1);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here

TOP

Related Classes of org.applause.lang.applauseDsl.Entity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.