Home | History | Annotate | Download | only in reporting
      1 /*
      2  * Copyright (c) 2007 Mockito contributors
      3  * This program is made available under the terms of the MIT License.
      4  */
      5 package org.mockito.internal.reporting;
      6 
      7 public class Pluralizer {
      8 
      9     public static String pluralize(int number) {
     10         return number == 1 ? "1 time" : number + " times";
     11     }
     12 
     13     public static String were_exactly_x_interactions(int x) {
     14         if (x == 1) {
     15             return "was exactly 1 interaction";
     16         } else {
     17             return "were exactly " + x + " interactions";
     18         }
     19     }
     20 }
     21