]> git.argeo.org Git - lgpl/argeo-commons.git/blob - ThroughputTest.java
d62f55c3f48d511d80205f898ee0c7a8d142b305
[lgpl/argeo-commons.git] / ThroughputTest.java
1 package org.argeo.util;
2
3 public class ThroughputTest {
4 public void testParse() throws Exception {
5 // assert 0 == 1;
6
7 Throughput t;
8 t = new Throughput("3.54/s");
9 assert 3.54d == t.getValue();
10 assert Throughput.Unit.s.equals(t.getUnit());
11 assert 282l == (long) t.asMsPeriod();
12
13 t = new Throughput("35698.2569/h");
14 assert Throughput.Unit.h.equals(t.getUnit());
15 assert 101l == (long) t.asMsPeriod();
16 }
17 }