<commit_before>/* Copyright (c) 2000-2003, jMock.org. See LICENSE.txt */
package test.jmock.dynamic.matcher;

import junit.framework.TestCase;

import org.jmock.dynamic.Invocation;
import org.jmock.dynamic.matcher.InvokedRecorder;
import org.jmock.expectation.AssertMo;

public class InvokedRecorderTest extends TestCase {
    private Invocation emptyInvocation =
        new Invocation(Void.class, "test", "example", new Class[0], Void.class, new Object[0]);
    private InvokedRecorder recorder = new InvokedRecorder();
    
    public void testAlwaysMatches() {
        assertTrue( "should match before invocation", 
                    recorder.matches(emptyInvocation));
        
        recorder.invoked(emptyInvocation);
        
        assertTrue( "should still match after invocation", 
                    recorder.matches(emptyInvocation));
    }
    
    public void testAlwaysVerifies() {
    	recorder.verify();
        recorder.invoked(emptyInvocation);
        recorder.verify();
    }
    
    public void testReportsIfHasBeenInvoked() {<commit_msg>[sf] changed visibility to keep eclipse quiet<commit_after>/* Copyright (c) 2000-2003, jMock.org. See LICENSE.txt */
package test.jmock.dynamic.matcher;

import junit.framework.TestCase;

import org.jmock.dynamic.Invocation;
import org.jmock.dynamic.matcher.InvokedRecorder;
import org.jmock.expectation.AssertMo;

public class InvokedRecorderTest extends TestCase {
    private Invocation emptyInvocation =
        new Invocation(Void.class, "test", "example", new Class[0], Void.class, new Object[0]);
    InvokedRecorder recorder = new InvokedRecorder();
    
    public void testAlwaysMatches() {
        assertTrue( "should match before invocation", 
                    recorder.matches(emptyInvocation));
        
        recorder.invoked(emptyInvocation);
        
        assertTrue( "should still match after invocation", 
                    recorder.matches(emptyInvocation));
    }
    
    public void testAlwaysVerifies() {
    	recorder.verify();
        recorder.invoked(emptyInvocation);
        recorder.verify();
    }
    
    public void testReportsIfHasBeenInvoked() {
{'fraction_non_alphanumeric': 0.0963855421686747, 'fraction_numerical': 0.009267840593141797, 'mean_word_length': 3.0890151515151514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1218722', 'n_tokens_mistral': 625, 'n_tokens_neox': 594, 'n_words': 135}