package org.ruler;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.ruler.Length.feet;
import static org.ruler.Length.inch;
import static org.ruler.Length.mile;

public class LengthAdditionTest {

    @Test
    public void one_mile_plus_one_mile_equals_to_2_mile() throws Exception {
        assertEquals(mile(1).plus(mile(1)), mile(2));
    }

    @Test
    public void test_13_inch_plus_11_inch_equals_to_2_feet() throws Exception {
        assertEquals(inch(13).plus(inch(11)), feet(2));
    }
}

@@ -192,16 +192,53 @@
 th.mile;
+%0Aimport static org.ruler.Length.yard;
 %0A%0Apublic
@@ -565,11 +565,160 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void test_2_feet_plus_2_yard_equals_to_3_yard() throws Exception %7B%0A        assertEquals(feet(3).plus(yard(2)), yard(3));%0A    %7D
 %0A%7D%0A

3 feet + 2 yard = 3 yard