Home | History | Annotate | Download | only in progress
      1 /*
      2  * Copyright (c) 2007 Mockito contributors
      3  * This program is made available under the terms of the MIT License.
      4  */
      5 
      6 package org.mockito.internal.progress;
      7 
      8 import org.junit.Rule;
      9 import org.junit.Test;
     10 import org.junit.rules.ExpectedException;
     11 import org.mockito.exceptions.base.MockitoException;
     12 import org.mockito.internal.verification.VerificationModeFactory;
     13 
     14 
     15 public class TimesTest  {
     16 	@Rule
     17 	public ExpectedException exception = ExpectedException.none();
     18 
     19     @Test
     20     public void shouldNotAllowNegativeNumberOfInvocations() throws Exception {
     21 
     22     	exception.expect(MockitoException.class);
     23     	exception.expectMessage("Negative value is not allowed here");
     24 
     25     	VerificationModeFactory.times(-50);
     26     }
     27 }
     28