Пример #1
0
 @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);
 }
Пример #2
0
 @Test
 public void distances() {
   Distance _km = Distance.km(15);
   Distance _km_1 = Distance.km(13);
   Distance _m = Distance.m(2000);
   Distance _plus = _km_1.operator_plus(_m);
   Assert.assertEquals(_km, _plus);
   Distance _km_2 = Distance.km(30);
   Distance _km_3 = Distance.km(13);
   Distance _m_1 = Distance.m(2000);
   Distance _plus_1 = _km_3.operator_plus(_m_1);
   Distance _multiply = _plus_1.operator_multiply(2);
   Assert.assertEquals(_km_2, _multiply);
 }