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
ee29f427
Commit
ee29f427
authored
May 31, 2021
by
Kai-Holger Brassel
Browse files
Forgot "strange" conversion to String for Quantities.getQuantity()
parent
95dc5a25
Pipeline
#3887
passed with stage
in 2 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
de.hftstuttgart.cityunits.tests/src/de/hftstuttgart/cityunits/tests/QuantityTest.java
View file @
ee29f427
...
...
@@ -68,9 +68,9 @@ class QuantityTest {
@Test
void
testCO2eq
()
{
Quantity
<
Mass
>
q
=
Quantities
.
getQuantity
(
"5200.5 kg·CO₂eq"
).
asType
(
Mass
.
class
);
Quantity
<
Mass
>
q
=
Quantities
.
getQuantity
(
(
String
)
"5200.5 kg·CO₂eq"
).
asType
(
Mass
.
class
);
assertEquals
(
"[M]"
,
q
.
getUnit
().
getDimension
().
toString
(),
"Wrong dimension!"
);
assertTrue
(
q
.
isEquivalentTo
(
Quantities
.
getQuantity
(
"5.2005 t·CO₂eq"
).
asType
(
Mass
.
class
)),
assertTrue
(
q
.
isEquivalentTo
(
Quantities
.
getQuantity
(
(
String
)
"5.2005 t·CO₂eq"
).
asType
(
Mass
.
class
)),
"Wrong conversion from kg of CO₂eq to ton of CO₂eq!"
);
}
...
...
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