Package com.pogofish.jadt.samples.whathow

Examples of com.pogofish.jadt.samples.whathow.GenericBinaryTreeUsage


* @author jiry
*/
public class GenericBinaryTreeUsageTest {
    @Test
    public void testMax() {
        GenericBinaryTreeUsage usage = new GenericBinaryTreeUsage();
        BinaryTree<String> empty = _EmptyTree();
       
        assertEquals(null, usage.max(empty));
       
        assertEquals("whatever", usage.max(_Node("hello", _Node("goodbye", empty, empty), _Node("whatever", empty, _Node("foo", empty, empty)))));
    }
View Full Code Here


        assertEquals("whatever", usage.max(_Node("hello", _Node("goodbye", empty, empty), _Node("whatever", empty, _Node("foo", empty, empty)))));
    }
   
    @Test
    public void testExampleCration() {
        GenericBinaryTreeUsage usage = new GenericBinaryTreeUsage();
        BinaryTree<String> empty = _EmptyTree();

        assertEquals(_Node("hello", _Node("goodbye", empty, empty), _Node("whatever", empty, _Node("foo", empty, empty))), usage.createExample());
    }
View Full Code Here

TOP

Related Classes of com.pogofish.jadt.samples.whathow.GenericBinaryTreeUsage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.