package net.lshift.spki.suiteb;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

public class ConditionJoinerTest  {
    private static final Condition[] BOOLEANS = new Condition[] {
        NeverCondition.NEVER, AlwaysCondition.ALWAYS};

    @Test
    public void test() {
        for (Condition a: BOOLEANS)  {
            for (Condition b: BOOLEANS) {
                assertEquals(
                        a.allows(null, null) || b.allows(null, null),
                        ConditionJoiner.or(a, b).allows(null, null));
                assertEquals(
                        a.allows(null, null) && b.allows(null, null),
                        ConditionJoiner.and(a, b).allows(null, null));
            }
        }
    }

}

@@ -26,16 +26,251 @@
 uiteb;%0A%0A
+import static net.lshift.spki.suiteb.AlwaysCondition.ALWAYS;%0Aimport static net.lshift.spki.suiteb.ConditionJoiner.and;%0Aimport static net.lshift.spki.suiteb.ConditionJoiner.or;%0Aimport static net.lshift.spki.suiteb.NeverCondition.NEVER;%0A
 import s
@@ -412,16 +412,24 @@
 BOOLEANS
+%0A       
  = new C
@@ -444,55 +444,15 @@
 %5B%5D %7B
-%0A        NeverCondition.NEVER, AlwaysCondition.
+NEVER, 
 ALWA
@@ -697,32 +697,16 @@
         
-ConditionJoiner.
 or(a, b)
@@ -851,32 +851,16 @@
         
-ConditionJoiner.
 and(a, b
@@ -912,11 +912,10 @@
 %7D%0A    %7D%0A
-%0A
 %7D%0A

Clean up test a little