Examples of auto()


Examples of org.apache.velocity.tools.generic.AlternatorTool.auto()

    public @Test void testAlternatorTool() {
        AlternatorTool alternatorTool = (AlternatorTool)toolbox.get("alternator");
        assertNotNull(alternatorTool);
        /* test automatic alternator */
        Alternator auto = alternatorTool.auto(new String[] {"red","blue","yellow"});
        assertStringEquals("red", auto.getCurrent());
        assertStringEquals("red", auto.getNext());
        assertStringEquals("blue", auto);
        assertStringEquals("yellow", auto);
        assertStringEquals("red", auto);
View Full Code Here

Examples of org.apache.velocity.tools.generic.AlternatorTool.auto()

    public @Test void testAlternatorTool() {
        AlternatorTool alternatorTool = (AlternatorTool)toolbox.get("alternator");
        assertNotNull(alternatorTool);
        /* test automatic alternator */
        Alternator auto = alternatorTool.auto(new String[] {"red","blue","yellow"});
        assertEquals("red",auto.getCurrent());
        assertEquals("red",auto.getNext());
        assertEquals("blue",auto.toString());
        assertEquals("yellow",auto.toString());
        assertEquals("red",auto.toString());
View Full Code Here

Examples of org.apache.velocity.tools.generic.AlternatorTool.auto()

    public @Test void testAlternatorTool() {
        AlternatorTool alternatorTool = (AlternatorTool)toolbox.get("alternator");
        assertNotNull(alternatorTool);
        /* test automatic alternator */
        Alternator auto = alternatorTool.auto(new String[] {"red","blue","yellow"});
        assertStringEquals("red", auto.getCurrent());
        assertStringEquals("red", auto.getNext());
        assertStringEquals("blue", auto);
        assertStringEquals("yellow", auto);
        assertStringEquals("red", auto);
View Full Code Here

Examples of org.jtester.annotations.DbFit.auto()

   * @return
   */
  public static String[] autoFindClassWhen(Class testClazz) {
    DbFit dbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    List<String> whens = getFiles(dbFit == null ? null : dbFit.when());
    if (dbFit != null && dbFit.auto() == AUTO.UN_AUTO) {
      return whens.toArray(new String[0]);
    } else {
      String wiki = String.format(CLAZZ_WHEN_WIKI, testClazz.getSimpleName());
      if (whens.contains(wiki) == false && ResourceHelper.isResourceExists(testClazz, wiki)) {
        whens.add(wiki);
View Full Code Here

Examples of org.jtester.annotations.DbFit.auto()

   *            测试方法
   * @return
   */
  private static boolean isAutoFind(Class testClazz, Method testMethod) {
    DbFit methodDbFit = testMethod.getAnnotation(DbFit.class);
    if (methodDbFit != null && methodDbFit.auto() != AUTO.DEFAULT) {
      return methodDbFit.auto() == AUTO.AUTO;
    }

    DbFit clazzDbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    if (clazzDbFit == null) {
View Full Code Here

Examples of org.jtester.annotations.DbFit.auto()

   * @return
   */
  private static boolean isAutoFind(Class testClazz, Method testMethod) {
    DbFit methodDbFit = testMethod.getAnnotation(DbFit.class);
    if (methodDbFit != null && methodDbFit.auto() != AUTO.DEFAULT) {
      return methodDbFit.auto() == AUTO.AUTO;
    }

    DbFit clazzDbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    if (clazzDbFit == null) {
      return true;
View Full Code Here

Examples of org.jtester.annotations.DbFit.auto()

    DbFit clazzDbFit = AnnotationUtils.getClassLevelAnnotation(DbFit.class, testClazz);
    if (clazzDbFit == null) {
      return true;
    } else {
      return !(clazzDbFit.auto() == AUTO.UN_AUTO);
    }
  }

  private static List<String> getFiles(String[] files) {
    List<String> list = new ArrayList<String>();
View Full Code Here

Examples of org.nutz.dao.entity.annotation.Id.auto()

    Id id = field.getAnnotation(Id.class);
    if (null != id) {
      // Check
      if (!ef.getMirror().isIntLike())
        throw error(entity, "@Id field [%s] must be a Integer!", field.getName());
      if (id.auto()) {
        ef.setType(FieldType.SERIAL);
        // 如果是自增字段,并且没有声明 '@Next' ,为其增加 SELECT MAX(id) ...
        if (null == field.getAnnotation(Next.class)) {
          ef.setAfterInsert(FieldQuerys.create("SELECT MAX($field) FROM $view", ef));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.