Fix unit tests

This commit is contained in:
Bane Stojkovic
2022-11-20 22:54:25 +01:00
parent 50588a759d
commit aaa24ad56a
@@ -54,7 +54,7 @@ public class CapacitorDatasheetService {
public CapacitorDatasheet lookup(Class<?> clazz, String key, Voltage voltage, Capacitance value, public CapacitorDatasheet lookup(Class<?> clazz, String key, Voltage voltage, Capacitance value,
Boolean polarized) { Boolean polarized) {
String lookupKey = key + "|" + format.format(voltage.getNormalizedValue()) + " VDC" String lookupKey = key + "|" + format.format(voltage.getNormalizedValue()) + " V"
+ (Optional.ofNullable(polarized).map(p -> p ? "" : " NP").orElse("")); + (Optional.ofNullable(polarized).map(p -> p ? "" : " NP").orElse(""));
String cacheKey = clazz.getName() + lookupKey + "|" + format.format(value.getNormalizedValue()); String cacheKey = clazz.getName() + lookupKey + "|" + format.format(value.getNormalizedValue());