@@ -0,0 +1,923 @@
+package xdean.jex.util.task;%0D%0A%0D%0Aimport static org.junit.Assert.assertEquals;%0D%0A%0D%0Aimport java.util.NoSuchElementException;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Apublic class TestIf %7B%0D%0A  @Test%0D%0A  public void testNormal() %7B%0D%0A    assertEquals(1, If.that(true).tobe(1).orbe(2).result());%0D%0A    assertEquals(2, If.that(false).tobe(1).orbe(2).result());%0D%0A  %7D%0D%0A%0D%0A  @Test%0D%0A  public void testSeries() %7B%0D%0A    assertEquals(1, If.that(true).tobe(1).and(false).tobe(2).result());%0D%0A    assertEquals(2, If.that(true).tobe(1).or(false).tobe(2).result());%0D%0A    assertEquals(1, If.that(true).tobe(1).or(false).tobe(2).end().result());%0D%0A    assertEquals(2, If.that(true).tobe(1).or(false).tobe(2).end(true).result());%0D%0A  %7D%0D%0A%0D%0A  @Test(expected = NoSuchElementException.class)%0D%0A  public void testNoResult() %7B%0D%0A    If.that(true).result();%0D%0A  %7D%0D%0A%0D%0A  @Test(expected = IllegalStateException.class)%0D%0A  public void testEnd() %7B%0D%0A    If.that(true).end();%0D%0A  %7D%0D%0A%7D%0D%0A

test if