package uk.co.benjiweber.expressions;

import org.junit.Test;

import java.util.List;

import static java.util.Arrays.asList;
import static org.junit.Assert.assertEquals;
import static uk.co.benjiweber.expressions.Times.times;

public class TimesTest {

    @Test
    public void times_collection_size() {
        List<String> aCollection = asList("one", "two", "three");

        times(aCollection.size()).invoke(this::foo);

        assertEquals(3, numberOfTimesFooWasInvoked);
    }

    @Test
    public void times_literal() {
        List<String> aCollection = asList("one", "two", "three");

        times(6).invoke(this::bar);

        assertEquals(6, numberOfTimesBarWasInvoked);
    }


    int numberOfTimesFooWasInvoked = 0;
    private void foo() {
        numberOfTimesFooWasInvoked++;
    }

    int numberOfTimesBarWasInvoked = 0;
    private void bar() {
        numberOfTimesBarWasInvoked++;
    }
}

@@ -528,75 +528,8 @@
 ) %7B%0A
-        List%3CString%3E aCollection = asList(%22one%22, %22two%22, %22three%22);%0A%0A
     

Remove unnecessary line