コード例 #1
0
 public void testWeightNegative() {
   try {
     _model.setWeight(-23);
     fail();
   } catch (IllegalArgumentException e) {
   }
 }
コード例 #2
0
 public void testWeightZero() {
   try {
     _model.setWeight(0);
     fail();
   } catch (IllegalArgumentException e) {
   }
 }
コード例 #3
0
 public void testWeightPositive() {
   try {
     _model.setWeight(75);
   } catch (IllegalArgumentException e) {
     fail();
   }
 }
コード例 #4
0
 public void testWeightRange() {
   try {
     _model.setWeight(2000); // Can't weigh more than 1000kg
     _model.setWeight(1000); // Can't weigh more than 1000kg
     fail();
   } catch (IllegalArgumentException e) {
   }
 }