]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.enterprise/ext/test/org/argeo/util/ThroughputTest.java
Add www.argeo.org home page URL.
[lgpl/argeo-commons.git] / org.argeo.enterprise / ext / test / org / argeo / util / 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 }