Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NeqModPlus
de.hft-stuttgart.cityunits
Commits
89b2e825
Commit
89b2e825
authored
Jun 11, 2021
by
Kai-Holger Brassel
Browse files
Forgot "strange" conversion to String for Quantities.getQuantity()
parent
527b8c29
Pipeline
#4742
passed with stage
in 2 minutes and 54 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
de.hftstuttgart.cityunits.tests/src/de/hftstuttgart/cityunits/tests/QuantityTest.java
View file @
89b2e825
...
...
@@ -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
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment