From 89b2e825813004e53acfad9db12906fa19743306 Mon Sep 17 00:00:00 2001 From: Kai Brassel <mail@khbrassel.de> Date: Fri, 11 Jun 2021 09:32:52 +0200 Subject: [PATCH] Forgot "strange" conversion to String for Quantities.getQuantity() --- .../src/de/hftstuttgart/cityunits/tests/QuantityTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/de.hftstuttgart.cityunits.tests/src/de/hftstuttgart/cityunits/tests/QuantityTest.java b/de.hftstuttgart.cityunits.tests/src/de/hftstuttgart/cityunits/tests/QuantityTest.java index 1e71c27..3ac669e 100644 --- a/de.hftstuttgart.cityunits.tests/src/de/hftstuttgart/cityunits/tests/QuantityTest.java +++ b/de.hftstuttgart.cityunits.tests/src/de/hftstuttgart/cityunits/tests/QuantityTest.java @@ -72,13 +72,13 @@ class QuantityTest { @Test void testIrradiance() { - Quantity<Intensity> q = Quantities.getQuantity("1000 W/m²").asType(Intensity.class); + Quantity<Intensity> q = Quantities.getQuantity((String) "1000 W/m²").asType(Intensity.class); assertEquals("[M]/[T]³", q.getUnit().getDimension().toString(), "Wrong dimension!"); } @Test void testVolumetricFlows() { - Quantity<VolumetricFlowRate> q = Quantities.getQuantity("10800000 l/h").asType(VolumetricFlowRate.class); + Quantity<VolumetricFlowRate> q = Quantities.getQuantity((String) "10800000 l/h").asType(VolumetricFlowRate.class); assertEquals("[L]³/[T]", q.getUnit().getDimension().toString(), "Wrong dimension!"); assertEquals("3 m³/s", q.toSystemUnit().toString()); } -- GitLab