package com.github.davidmoten.rtree;

import java.util.ArrayList;

import org.junit.Test;

public class LeafTest {

    @Test(expected = IllegalArgumentException.class)
    public void testCannotHaveZeroChildren() {
        Context context = new Context(2, 4, new SelectorMinimalAreaIncrease(),
                new SplitterQuadratic());
        new Leaf<Object>(new ArrayList<Entry<Object>>(), context);
    }

    @Test
    public void testMbr() {
        // TODO
    }

}

@@ -42,307 +42,738 @@
 ort 
-java.util.ArrayList;%0A%0Aimport org.junit.Test;%0A%0Apublic class LeafTest %7B%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void testCannotHaveZeroChildren() %7B%0A        Context context = new Context(2, 4, new SelectorMinimalAreaIncrease(),%0A                new SplitterQuadratic());%0A       
+static org.junit.Assert.assertEquals;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0A%0Aimport org.junit.Test;%0A%0Aimport com.github.davidmoten.rtree.geometry.Geometries;%0Aimport com.github.davidmoten.rtree.geometry.Rectangle;%0A%0Apublic class LeafTest %7B%0A%0A    private static Context context = new Context(2, 4, new SelectorMinimalAreaIncrease(),%0A            new SplitterQuadratic());%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void testCannotHaveZeroChildren() %7B%0A        new Leaf%3CObject%3E(new ArrayList%3CEntry%3CObject%3E%3E(), context);%0A    %7D%0A%0A    @Test%0A    public void testMbr() %7B%0A        Rectangle r1 = Geometries.rectangle(0, 1, 3, 5);%0A        Rectangle r2 = Geometries.rectangle(1, 2, 4, 6);%0A        Rectangle r =
  new
@@ -790,94 +790,127 @@
 ct%3E(
-new 
 Array
+s.as
 List
-%3C
+(
 Entry
-%3C
+.entry(new 
 Object
-%3E%3E
 (), 
-context);
+r1),
 %0A    
-%7D%0A%0A
     
-@Test%0A    public void testM
+        Entry.entry(new Object(), r2)), context).geometry().m
 br()
- %7B
+;
 %0A   
@@ -918,21 +918,63 @@
     
-// TODO
+assertEquals(Geometries.rectangle(0, 1, 4, 6), r);
 %0A    %7D%0A
-%0A
 %7D%0A

add leaf mbr test