Examples of Description


Examples of org.assertj.core.description.Description

    factory.formatter = formatter;
  }

  @Test
  public void should_implement_toString() {
    Description description = new TestDescription("Test");
    Representation representation = new StandardRepresentation();
    String formattedMessage = "[Test] Hello Yoda";
    when(formatter.format(description, representation, "Hello %s", "Yoda")).thenReturn(formattedMessage);
    assertEquals(formattedMessage, factory.create(description, representation));
  }
View Full Code Here

Examples of org.crsh.cli.descriptor.Description

        methodDescriptor.addParameter(parameter);
      }
      return methodDescriptor;
    } else {
      Map<String, MethodDescriptor<T>> methodMap = new LinkedHashMap<String, MethodDescriptor<T>>();
      ClassDescriptor<T> classDescriptor = new ClassDescriptor<T>(type, commandName, methodMap, new Description(type));
      for (Method method : methods) {
        String methodName;
        if (method.getAnnotation(Named.class) != null) {
          methodName = method.getAnnotation(Named.class).value();
        } else {
View Full Code Here

Examples of org.eclipse.sisu.Description

            return ( (DescribedBinding) source ).getDescription();
        }
        final Class<T> clazz = getImplementationClass();
        if ( null != clazz )
        {
            final Description description = clazz.getAnnotation( Description.class );
            if ( null != description )
            {
                return description.value();
            }
            final org.sonatype.inject.Description legacy = clazz.getAnnotation( org.sonatype.inject.Description.class );
            if ( null != legacy )
            {
                return legacy.value();
View Full Code Here

Examples of org.fest.assertions.Description

* @author Yvonne Wang
*/
public class Condition_toString_Test {
  @Test
  public void should_return_description_text() {
    Description description = new Description() {
      @Override
      public String value() {
        return "Hello World!";
      }
    };
View Full Code Here

Examples of org.fest.assertions.description.Description

   private String computeDescribitionText() {
      StringBuilder sb = new StringBuilder();
      sb.append(prefix.trim());

      Description d = super.description();
      if (d != null) {
         sb.append(" ").append(d.value());
      }
      return sb.toString();
   }
View Full Code Here

Examples of org.geotools.styling.Description

    }

    @Test
    public void description() {
        DescriptionBuilder b = new DescriptionBuilder();
        Description d = b.build();
        assertNull(d.getTitle());
        assertNull(d.getAbstract());

        assertNull(b.unset().build());

        b = new DescriptionBuilder();
        b.description("here be dragons");
        d = b.build();

        assertEquals("here be dragons", d.getAbstract().toString());
        assertNull(b.build().getAbstract());

        b = new DescriptionBuilder();
        b.description("here be dragons");
        d = b.build();

        assertEquals("here be dragons", d.getAbstract().toString());
    }
View Full Code Here

Examples of org.gjt.bugrat.db.Description

    {
    String contextStr =
      ( absURLs ? bReq.getServletUrlPrefix() : "" )
        + bReq.getServletContext();

    Description desc = bug.getDescription();
    EnvDescription eDesc = bug.getEnvDescription();
    Description repro = bug.getReproDescription();
    Description around = bug.getAroundDescription();

    cW.println( "<table width=\"100%\" cellspacing=\"0\"" );
    cW.println( "       cellpadding=\"0\">" );

    cW.println( "<tr>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>Project:</strong>" );
    cW.println( this.dbConfig.getProjectName( bug.getProject() ) );

    cW.println( "</td>" );
    cW.println( "<td width=\"50%\">" );
    cW.println( "<strong>Release:</strong>" );
    cW.println( (eDesc == null)
        ? "Unknown" : eDesc.getRelease() );

    cW.println( "</td>" );
    cW.println( "</tr>" );

    cW.println( "<tr>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>Category:</strong>" );
    cW.println
      ( this.dbConfig.getCategoryName
        ( bug.getProject(), bug.getCategory() ) );

    cW.println( "</td>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>SubCategory:</strong>" );
    cW.println
      ( this.dbConfig.getSubCategoryName
        ( bug.getProject(), bug.getCategory(),
          bug.getSubCategory() ) );

    cW.println( "</td>" );
    cW.println( "</tr>" );

    cW.println( "<tr>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>Class:</strong>" );
    cW.println( this.dbConfig.getClassName( bug.getBugClass() ) );

    cW.println( "</td>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>State:</strong>" );
    cW.println( this.dbConfig.getStateName( bug.getState() ) );

    cW.println( "</td>" );
    cW.println( "</tr>" );

    cW.println( "<tr>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>Priority:</strong>" );   
    cW.println( this.dbConfig.getPriorityName( bug.getPriority() ) );

    cW.println( "</td>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>Severity:</strong>" );
    cW.println( this.dbConfig.getSeverityName( bug.getSeverity() ) );

    cW.println( "</td>" );
    cW.println( "</tr>" );

    cW.println( "<tr>" );
    cW.println( "<td width=\"50%\">" );

    cW.println( "<strong>Confidence:</strong>" );
    cW.println( this.dbConfig.getConfidenceName( bug.getConfidence() ) );
    cW.println( "<br>" );

    cW.println( "</td>" );

    if ( desc.hasEmail() )
      {
      cW.println( "<td width=\"50%\">" );
      cW.print  ( "<a href=\"" );
      cW.print  ( contextStr );
      cW.print  ( "/" );
      cW.print  ( bReq.getViewerServletName() );
      cW.print  ( "/ShowEmail/" );
      cW.println( desc.getEmailId() );
      cW.println( "\">" );
      cW.println( "<strong>" );
      cW.println( "View Original Email" );  
      cW.println( "</strong>" );
      cW.println( "</a>" );
      cW.println( "</td>" );
      }

    cW.println( "</tr>" );

    cW.println( "</table>" );

    cW.println( "<p>" );

    StringBuffer openDateStr = new StringBuffer();
    FieldPosition openPos = new FieldPosition(0);
    this.dateFmt.format( bug.getOpenDate(), openDateStr, openPos );

    cW.println( "<strong>Date Opened:</strong>" );
    cW.println( openDateStr.toString() );
    cW.println( "<br>" );

    StringBuffer closeDateStr = new StringBuffer();
    if ( bug.getCloseDate() == null )
      {
      closeDateStr.append( "Not closed." );
      }
    else
      {
      FieldPosition closePos = new FieldPosition(0);
      this.dateFmt.format( bug.getCloseDate(), closeDateStr, closePos );
      }

    cW.println( "<strong>Date Closed:</strong>" );
    cW.println( closeDateStr.toString() );
    cW.println( "<br>" );

    cW.println( "<strong>Responsible:</strong>" );

    String responsible = null;
    if ( bug.getResponsible() == 0 )
      {
      responsible = "Not assigned";
      }
    else
      {
      responsible =
        this.dbConfig.formatPerson( bug.getResponsible() );
      }

    cW.println( responsible );

    cW.println( "<p>" );
    cW.println( "<DL>" );
    cW.println( "<DT><strong>Synopsis:</strong>" );
    cW.println( "<DD>" );
    cW.println( bug.getDescription().getSynopsis() );
    cW.println( "</DL>" );

    if ( eDesc == null
      {
      cW.println( "<strong>Environment:</strong>" );
      cW.println( "Environment Not Defined" );
      }
    else    
      {
      cW.println( "<DL>" );
      cW.print  ( "<DT><strong> " );
      cW.print  ( "Environment:</strong> " );
      cW.println( "(jvm, os, osrel, platform)" );
      cW.println( "<DD>" );
      cW.print  ( eDesc.getJVM() );
      cW.print  ( ", " );
      cW.print  ( eDesc.getOS() );
      cW.print  ( ", " );
      cW.print  ( eDesc.getOSRelease() );
      cW.print  ( ", " );
      cW.println( eDesc.getPlatform() );
      cW.println( "</DL>" );

      cW.println( "<p>" );
      cW.println( "<DL>" );
      cW.println( "<DT><strong>Additional Environment Description:</strong>" );

      cW.println( "<DD>" );
      cW.println( eDesc.getDescription() );
      cW.println( "</DL>" );
      }

    cW.println( "<p>" );

    cW.println( "<DL>" );
    cW.println( "<DT><strong>Report Description:</strong>" );

    cW.println( "<DD>" );
    cW.println( desc.getDescription() );
    cW.println( "</DL>" );

    if ( repro != null )
      {
      cW.println( "<p>" );

      cW.println( "<DL>" );
      cW.println( "<DT><strong>How To Reproduce:</strong>" );

      cW.println( "<DD>" );
      cW.println( repro.getDescription() );
      cW.println( "</DL>" );
      }

    if ( around != null )
      {
      cW.println( "<p>" );
      cW.println( "<DL>" );
      cW.println( "<DT><strong>Workaround:</strong>" );

      cW.println( "<DD>" );
      cW.println( around.getDescription() );
      cW.println( "</DL>" );
      }
    }
View Full Code Here

Examples of org.glassfish.admin.amx.annotation.Description

            return null;
        }

        final String methodName = m.getName();

        final Description d = m.getAnnotation(Description.class);
        final String description = d == null ? "" : d.value();

        String attrName = JMXUtil.getAttributeName(m);
        final boolean isGetter = JMXUtil.isGetter(m);
        final boolean isSetter = JMXUtil.isSetter(m);
        final boolean isIs = JMXUtil.isIs(m);
View Full Code Here

Examples of org.glassfish.gmbal.Description

        return resourceBundle ;
    }
   
    public synchronized String getDescription( EvaluatedDeclaration element ) {
        // Can be called anytime
        Description desc ;
        if (element instanceof EvaluatedClassDeclaration) {
            EvaluatedClassDeclaration ecd = (EvaluatedClassDeclaration)element;
            desc = getFirstAnnotationOnClass(ecd, Description.class ) ;
        } else {
            desc = getAnnotation( element.element(), Description.class ) ;
        }

        String result = "" ;
        if (desc != null) {
            result = desc.value() ;
        }

        if (result.length() == 0) {
            result = Exceptions.self.noDescriptionAvailable() ;
        } else {
View Full Code Here

Examples of org.hamcrest.Description

    private String qualifiedMethodName() {
        return MockUtil.getMockName(mock) + "." + method.getName();
    }

    private String getArgumentsLine(List<Matcher> matchers) {
        Description result = new StringDescription();
        result.appendList("(", ", ", ");", matchers);
        return result.toString();
    }
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.