computerluca / lambdaj

Automatically exported from code.google.com/p/lambdaj
1 stars 0 forks source link

Lambda should rethrow exception from select - having on clause #86

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This test should be passing:

package lambdaj.bugs;

import static ch.lambdaj.Lambda.*;

import org.junit.Test;

public class LambdaNotRethrowingExceptionTest {

    public class A {

        public Boolean throwException() {
            throw new RuntimeException("where is it?");
        }

    }

    @Test(expected = RuntimeException.class)
    public void shouldThrowException() {
        select(java.util.Arrays.asList(new A()), having(on(A.class).throwException()));
    }
}

Original issue reported on code.google.com by tomasz.b...@pragmatists.pl on 21 Feb 2012 at 1:18