Examples of countSubscribers()


Examples of barsuift.simLife.j3d.tree.TreeLeaf3D.countSubscribers()

    }

    public void testUpdate() {
        TreeLeaf3D leaf3D = leaf.getTreeLeaf3D();
        // the leaf should be a subscriber of the leaf3D
        assertEquals(1, leaf3D.countSubscribers());
        // assert the leaf is really one of the subscribers of the leaf3D
        leaf3D.deleteSubscriber(leaf);
        assertEquals(0, leaf3D.countSubscribers());

View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3D.countSubscribers()

        TreeLeaf3D leaf3D = leaf.getTreeLeaf3D();
        // the leaf should be a subscriber of the leaf3D
        assertEquals(1, leaf3D.countSubscribers());
        // assert the leaf is really one of the subscribers of the leaf3D
        leaf3D.deleteSubscriber(leaf);
        assertEquals(0, leaf3D.countSubscribers());


        publisherHelper.addSubscriberTo(leaf);

        // test with wrong argument
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3D.countSubscribers()

            // leaf3D and gravity are subscribers of the leaf
            assertEquals(2, treeLeaf.countSubscribers());

            // leaf is subscriber of the leaf3D
            assertEquals(1, treeLeaf3D.countSubscribers());

            // assert the gravity is really one of the subscribers of the leaf
            treeLeaf.deleteSubscriber(gravity);
            assertEquals(1, treeLeaf.countSubscribers());
            // assert the leaf3D is really one of the subscribers of the leaf
View Full Code Here

Examples of barsuift.simLife.j3d.tree.TreeLeaf3D.countSubscribers()

            treeLeaf.deleteSubscriber(treeLeaf3D);
            assertEquals(0, treeLeaf.countSubscribers());

            // assert the leaf is really one of the subscribers of the leaf3D
            treeLeaf3D.deleteSubscriber(treeLeaf);
            assertEquals(0, treeLeaf3D.countSubscribers());

        }

        MockTreeLeaf treeLeaf = new MockTreeLeaf();
        gravity.addFallingLeaf(treeLeaf);
View Full Code Here

Examples of barsuift.simLife.tree.MockTreeLeaf.countSubscribers()

        MockTreeLeaf treeLeaf = new MockTreeLeaf();
        gravity.addFallingLeaf(treeLeaf);
        assertEquals(3, gravity.getFallingLeaves().size());
        assertEquals(3, gravity.getGravity3D().getGroup().numChildren());
        // gravity is subscriber of the leaf
        assertEquals(1, treeLeaf.countSubscribers());
        treeLeaf.deleteSubscriber(gravity);
        // assert the gravity is really one of the subscribers of the leaf
        assertEquals(0, treeLeaf.countSubscribers());
    }
View Full Code Here

Examples of barsuift.simLife.tree.MockTreeLeaf.countSubscribers()

        assertEquals(3, gravity.getGravity3D().getGroup().numChildren());
        // gravity is subscriber of the leaf
        assertEquals(1, treeLeaf.countSubscribers());
        treeLeaf.deleteSubscriber(gravity);
        // assert the gravity is really one of the subscribers of the leaf
        assertEquals(0, treeLeaf.countSubscribers());
    }

    public void testUpdate() {
        BasicGravity gravity = new BasicGravity(gravityState, universe);
        MockTreeLeaf treeLeaf = new MockTreeLeaf();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.