Project

General

Profile

Revision f9b2e056

IDf9b2e056dfaab83ada5d1db4cf22c85009eabcd6
Parent 9aa01c88
Child 1a54474b

Added by Andreas Müller over 7 years ago

Remove ". " from year only nom-refs

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/reference/NomRefDefaultCacheStrategyBase.java
129 129
			microReference = getBeforeMicroReference() + microReference;
130 130
		}
131 131
		result = result.replaceAll(INomenclaturalReference.MICRO_REFERENCE_TOKEN, microReference);
132
		if (result.startsWith(". ")){
133
			result = result.substring(2);
134
		}
132 135
		return result;
133 136
	}
134 137

  
cdmlib-model/src/test/java/eu/etaxonomy/cdm/strategy/cache/reference/GenericDefaultCacheStrategyTest.java
110 110
		generic1.setAuthorTeam(team1);
111 111
		generic1.setTitleCache(null);  //reset cache in case aspectJ is not enabled
112 112
		Assert.assertEquals("Unexpected title cache.", "Authorteam", generic1.getTitleCache());
113
		Assert.assertEquals("", generic1.getNomenclaturalCitation(null));
113 114
	}
114 115
	
115 116
	@Test
......
117 118
		generic1.setAuthorTeam(team1);
118 119
		generic1.setDatePublished(TimePeriodParser.parseString("1792"));
119 120
		generic1.setTitleCache(null);  //reset cache in case aspectJ is not enabled
120
		Assert.assertEquals("Unexpected title cache.", "Authorteam, 1792", generic1.getTitleCache());
121
		Assert.assertEquals("Unexpected title cache.", "Authorteam, 1792", generic1.getTitleCache());	
122
		Assert.assertEquals("1792", generic1.getNomenclaturalCitation(null));
121 123
	}
122 124

  
123 125

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)