Пример #1
0
 public void copyXtendMemberForReferences(final Scenario scenario) {
   EList<Step> _steps = scenario.getSteps();
   Iterable<StepReference> _filter = Iterables.<StepReference>filter(_steps, StepReference.class);
   final Function1<StepReference, Boolean> _function =
       new Function1<StepReference, Boolean>() {
         public Boolean apply(final StepReference it) {
           StepImplementation _reference = it.getReference();
           XExpression _expression = null;
           if (_reference != null) {
             _expression = _reference.getExpression();
           }
           boolean _notEquals = (!Objects.equal(_expression, null));
           return Boolean.valueOf(_notEquals);
         }
       };
   final Iterable<StepReference> refs =
       IterableExtensions.<StepReference>filter(_filter, _function);
   final Set<String> fieldNames = this.getExistingFieldNamesForContainerOfStepReference(scenario);
   for (final StepReference ref : refs) {
     {
       StepImplementation _reference = ref.getReference();
       final Iterable<XtendMember> members =
           this._visibleMembersCalculator.allVisibleMembers(_reference);
       this.copyFields(scenario, members, fieldNames);
     }
   }
 }
 public Iterable<XtendMember> allVisibleMembers(final Step step) {
   final Scenario scenario = EcoreUtil2.<Scenario>getContainerOfType(step, Scenario.class);
   boolean _equals = Objects.equal(scenario, null);
   if (_equals) {
     return CollectionLiterals.<XtendMember>emptyList();
   }
   EList<XtendMember> members = scenario.getMembers();
   if ((scenario instanceof Background)) {
     return members;
   }
   final Feature feature = EcoreUtil2.<Feature>getContainerOfType(scenario, Feature.class);
   Background _background = feature.getBackground();
   boolean _equals_1 = Objects.equal(_background, null);
   if (_equals_1) {
     return members;
   }
   Background _background_1 = feature.getBackground();
   EList<XtendMember> _members = _background_1.getMembers();
   return Iterables.<XtendMember>concat(members, _members);
 }
Пример #3
0
 public String describe(final Scenario scenario) {
   String _name = scenario.getName();
   String _makeJunitConform = Strings.makeJunitConform(_name);
   return _makeJunitConform;
 }