From c1275817c5bb1de37613b39103e36089ab4772ac Mon Sep 17 00:00:00 2001 From: mabofu Date: Sun, 27 Apr 2025 16:18:56 +0800 Subject: [PATCH] Fixed code coverage: fixed QueryResultItemValue code coverage --- .../result/QueryResultItemValueTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dsms-engine-application/src/test/java/com/dsms/common/prometheus/converter/result/QueryResultItemValueTest.java diff --git a/dsms-engine-application/src/test/java/com/dsms/common/prometheus/converter/result/QueryResultItemValueTest.java b/dsms-engine-application/src/test/java/com/dsms/common/prometheus/converter/result/QueryResultItemValueTest.java new file mode 100644 index 0000000..e810375 --- /dev/null +++ b/dsms-engine-application/src/test/java/com/dsms/common/prometheus/converter/result/QueryResultItemValueTest.java @@ -0,0 +1,15 @@ +package com.dsms.common.prometheus.converter.result; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +class QueryResultItemValueTest { + + @Test + void getPercentageValue() { + QueryResultItemValue queryResultItemValue = new QueryResultItemValue(); + queryResultItemValue.setValue(0.011007705393775605); + queryResultItemValue.setTimestamp(System.currentTimeMillis()); + Assertions.assertEquals(1.1, queryResultItemValue.getPercentageValue()); + } +} \ No newline at end of file -- Gitee