@Test public void speed() { Distance _km = Distance.km(42); Time _h = Time.h(); Speed _divide = Speed.operator_divide(_km, _h); Distance _m = Distance.m(40000); Distance _km_1 = Distance.km(2); Distance _plus = _m.operator_plus(_km_1); Time _min = Time.min(60); Speed _divide_1 = Speed.operator_divide(_plus, _min); Assert.assertEquals(_divide, _divide_1); }
@Test public void time() { Time _h = Time.h(1); Time _sec = Time.sec(65); Time _min = Time.min(59); Time _plus = _sec.operator_plus(_min); Time _msec = Time.msec(5000); Time _minus = _plus.operator_minus(_msec); Assert.assertEquals(_h, _minus); }