Exemplo n.º 1
0
 public String describe(final Step step) {
   String _nameOf = this.nameOf(step);
   StringBuilder _stringBuilder = new StringBuilder(_nameOf);
   StringBuilder name = _stringBuilder;
   boolean _isPending = step.isPending();
   if (_isPending) {
     Strings.markAsPending(name);
   }
   String _string = name.toString();
   String _firstLine = Strings.firstLine(_string);
   return Strings.makeJunitConform(_firstLine);
 }
Exemplo n.º 2
0
 protected String codeToHtml(final String code) {
   String _normalize = this._whiteSpaceNormalizer.normalize(code);
   CharSequence _trimWhitespaceAtEnd = org.jnario.util.Strings.trimWhitespaceAtEnd(_normalize);
   String _string = _trimWhitespaceAtEnd.toString();
   String _html = this.toHtml(_string);
   return _html.replace("\t", "  ");
 }
Exemplo n.º 3
0
 public String removeArguments(final String text) {
   String _xblockexpression = null;
   {
     String name = Strings.firstLine(text);
     String _removeArgumentValues = ArgumentsHelper.removeArgumentValues(name);
     String _trim = _removeArgumentValues.trim();
     _xblockexpression = (_trim);
   }
   return _xblockexpression;
 }
Exemplo n.º 4
0
 public String normalize(final CharSequence input) {
   String _xblockexpression = null;
   {
     boolean _or = false;
     boolean _equals = Objects.equal(input, null);
     if (_equals) {
       _or = true;
     } else {
       int _length = input.length();
       boolean _equals_1 = (_length == 0);
       _or = _equals_1;
     }
     if (_or) {
       return "";
     }
     String _string = input.toString();
     String[] _split = _string.split("\r?\n");
     Iterable<String> lines = Arrays.<String>asList(_split);
     boolean _isEmpty = IterableExtensions.isEmpty(lines);
     if (_isEmpty) {
       return "";
     }
     String firstLine = IterableExtensions.<String>head(lines);
     while ((firstLine.trim().length() == 0)) {
       {
         Iterable<String> _drop = IterableExtensions.<String>drop(lines, 1);
         lines = _drop;
         String _head = IterableExtensions.<String>head(lines);
         firstLine = _head;
         boolean _equals_2 = Objects.equal(firstLine, null);
         if (_equals_2) {
           return "";
         }
       }
     }
     final String whitespace = this.whitespaceAtBeginning(firstLine);
     String ending = "";
     boolean _endsWith = Strings.endsWith(input, "\n");
     if (_endsWith) {
       ending = "\n";
     }
     final Function1<String, String> _function =
         new Function1<String, String>() {
           public String apply(final String it) {
             return WhiteSpaceNormalizer.this.remove(it, whitespace);
           }
         };
     Iterable<String> _map = IterableExtensions.<String, String>map(lines, _function);
     String _join = IterableExtensions.join(_map, "\n");
     String result = (_join + ending);
     _xblockexpression = result;
   }
   return _xblockexpression;
 }
Exemplo n.º 5
0
 protected String id(final String id) {
   String _replaceAll = null;
   if (id != null) {
     _replaceAll = id.replaceAll("\\W+", AbstractDocGenerator.SEP);
   }
   String _trim = null;
   if (_replaceAll != null) {
     char _charAt = AbstractDocGenerator.SEP.charAt(0);
     _trim = org.jnario.util.Strings.trim(_replaceAll, _charAt);
   }
   String _plus = (" id=\"" + _trim);
   return (_plus + "\"");
 }
Exemplo n.º 6
0
 public String describe(final Scenario scenario) {
   String _name = scenario.getName();
   String _makeJunitConform = Strings.makeJunitConform(_name);
   return _makeJunitConform;
 }
Exemplo n.º 7
0
 public String describe(final Feature feature) {
   String _name = feature.getName();
   String _makeJunitConform = Strings.makeJunitConform(_name);
   return _makeJunitConform;
 }
Exemplo n.º 8
0
 public String getMethodName(final Step step) {
   String _nameOf = this.nameOf(step);
   String _firstLine = Strings.firstLine(_nameOf);
   String originalName = _firstLine.trim();
   return Strings.toMethodName(originalName);
 }