Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2014 Objectos, F√°brica de Software LTDA.
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
  * the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package br.com.objectos.way.auto.functional;

Author(s):
patricia.nascimento@objectos.com.br (Patricia Nascimento)
  @Test
  public void generic() {
    ..about(JavaSourceSubjectFactory.javaSource())
        .that(JavaFileObjects.forResource("code/way-auto-functional/Generic.java"))
        .processedWith(new AutoFunctionalProcessor())
        .compilesWithoutError()
        .and().generatesSources(
            forSourceCode("GenericIsValid""GenericIsValid.java"),
            forSourceCode("GenericName""GenericName.java"));
  }
  @Test
  public void simple() {
    ..about(JavaSourceSubjectFactory.javaSource())
        .that(JavaFileObjects.forResource("code/way-auto-functional/Simple.java"))
        .processedWith(new AutoFunctionalProcessor())
        .compilesWithoutError()
        .and().generatesSources(
            forSourceCode("SimpleGetName""SimpleGetName.java"),
            forSourceCode("SimpleIsOpen""SimpleIsOpen.java"),
            forSourceCode("SimpleIsLate""SimpleIsLate.java"),
            forSourceCode("SimpleToDate""SimpleToDate.java"),
            forSourceCode("SimpleToDoubleValue""SimpleToDoubleValue.java"),
            forSourceCode("SimpleToGeneric""SimpleToGeneric.java"),
            forSourceCode("SimpleToIntValue""SimpleToIntValue.java"),
            forSourceCode("SimpleToTotalValue""SimpleToTotalValue.java"));
  }
  private JavaFileObject forSourceCode(String nameString path) {
    String source = WayAsserts.contentsOf("/code/way-auto-functional/" + path);
    String qname = "br.com.objectos.way.auto.core.fakes." + name;
    return JavaFileObjects.forSourceString(qnamesource);
  }
New to GrepCode? Check out our FAQ X