1 package uk.co.jezuk.mango; 2 3 import junit.framework.*; 4 5 public class IdentityTest extends TestCase 6 { 7 public IdentityTest(String name) { super(name); } 8 public static Test suite() { return new TestSuite(IdentityTest.class); } 9 10 public void test1() 11 { 12 UnaryFunction i = Functions.Identity(); 13 assertEquals(this, i.fn(this)); 14 assertEquals(null, i.fn(null)); 15 assertEquals("hello", i.fn("hello")); 16 assertEquals(i, i.fn(i)); 17 } } | Popular Tags |