@Test public void taxonWCSDistribution() { Taxon tax = new Taxon(); tax.setTaxonomicStatus(TaxonomicStatus.Accepted); tax.setTaxonRemarks("Andaman Is., Thailand to W. Malesia."); assertEquals("This plant is accepted, and its native range is Andaman Islands, Thailand to W. Malesia.", new Summary(tax, messageSource).build()); }
public String build() { if (taxon.isAccepted() || taxon.getTaxonomicStatus() == TaxonomicStatus.Artificial_Hybrid) { return createAcceptedNameSummary(); } if (taxon.isSynonym() || taxon.getTaxonomicStatus() == TaxonomicStatus.Misapplied) { return createSynonymNameSummary(); } if (TaxonomicStatus.Unplaced.equals(taxon.getTaxonomicStatus())) { return createUnplacedNameSummary(); } return ""; }
Summary { public String build() { if (taxon.isAccepted() || taxon.getTaxonomicStatus() == TaxonomicStatus.Artificial_Hybrid) { return createAcceptedNameSummary(); } if (taxon.isSynonym() || taxon.getTaxonomicStatus() == TaxonomicStatus.Misapplied) { return createSynonymNameSummary(); } if (TaxonomicStatus.Unplaced.equals(taxon.getTaxonomicStatus())) { return createUnplacedNameSummary(); } return ""; } }
Summary { public String build() { if (taxon.isAccepted() || taxon.getTaxonomicStatus() == TaxonomicStatus.Artificial_Hybrid) { return createAcceptedNameSummary(); } if (taxon.isSynonym() || taxon.getTaxonomicStatus() == TaxonomicStatus.Misapplied) { return createSynonymNameSummary(); } if (TaxonomicStatus.Unplaced.equals(taxon.getTaxonomicStatus())) { return createUnplacedNameSummary(); } return ""; } Summary(Taxon taxon, MessageSource messageSource); }
Summary { public String build() { if (taxon.isAccepted() || taxon.getTaxonomicStatus() == TaxonomicStatus.Artificial_Hybrid) { return createAcceptedNameSummary(); } if (taxon.isSynonym() || taxon.getTaxonomicStatus() == TaxonomicStatus.Misapplied) { return createSynonymNameSummary(); } if (TaxonomicStatus.Unplaced.equals(taxon.getTaxonomicStatus())) { return createUnplacedNameSummary(); } return ""; } Summary(Taxon taxon, MessageSource messageSource); String taxonStatus(); String build(); }
Summary { public String build() { if (taxon.isAccepted() || taxon.getTaxonomicStatus() == TaxonomicStatus.Artificial_Hybrid) { return createAcceptedNameSummary(); } if (taxon.isSynonym() || taxon.getTaxonomicStatus() == TaxonomicStatus.Misapplied) { return createSynonymNameSummary(); } if (TaxonomicStatus.Unplaced.equals(taxon.getTaxonomicStatus())) { return createUnplacedNameSummary(); } return ""; } Summary(Taxon taxon, MessageSource messageSource); String taxonStatus(); String build();  }