// Path: units/src/com/leandog/brazenhead/test/BrazenheadTestRunner.java
// public class BrazenheadTestRunner extends RobolectricTestRunner {
// 
//     public BrazenheadTestRunner(Class<?> testClass) throws InitializationError {
//         super(testClass, new File("../driver"));
//     }
//     
//     @Override
//     public Object createTest() throws Exception {
//         Object theTest = super.createTest();
//         MockitoAnnotations.initMocks(theTest);
//         return theTest;
//     }
//     
//     @Override
//     public void beforeTest(Method method) {
//         bindShadowClass(ShadowInstrumentationTestCase.class);
//     }
// 
// }


import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import org.junit.*;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import android.view.View;
import com.google.brazenhead.gson.*;
import com.leandog.brazenhead.test.BrazenheadTestRunner;
    public void itReturnsTheRight() {
        when(theView.getRight()).thenReturn(123);
        assertThat(integer("right"), is(123));
    }
    
    @Test
    public void itReturnsTheBottom() {
        when(theView.getBottom()).thenReturn(123);
        assertThat(integer("bottom"), is(123));
    }
    
    private int integer(final String field) {
        return serialize().get(field).getAsInt();
    }

    private String string(final String field) {
        return serialize().get(field).getAsString();
    }
    
    private int[] integerArray(final String field) {
        final JsonArray jsonArray = serialize().get(field).getAsJsonArray();
        int[] integers = new int[jsonArray.size()];
        for(int index = 0; index < integers.length; index++) {
            integers[index] = jsonArray.get(index).getAsInt();
        }
        return integers;
    }

    private JsonObject serialize() {
        JsonObject json = (JsonObject)viewSerializer.serialize(theView, null, null);
// Path: units/src/com/leandog/brazenhead/test/BrazenheadTestRunner.java
// public class BrazenheadTestRunner extends RobolectricTestRunner {
// 
//     public BrazenheadTestRunner(Class<?> testClass) throws InitializationError {
//         super(testClass, new File("../driver"));
//     }
//     
//     @Override
//     public Object createTest() throws Exception {
//         Object theTest = super.createTest();
//         MockitoAnnotations.initMocks(theTest);
//         return theTest;
//     }
//     
//     @Override
//     public void beforeTest(Method method) {
//         bindShadowClass(ShadowInstrumentationTestCase.class);
//     }
// 
// }


// Path: units/src/com/leandog/brazenhead/json/ViewSerializerTest.java
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import org.junit.*;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import android.view.View;
import com.google.brazenhead.gson.*;
import com.leandog.brazenhead.test.BrazenheadTestRunner;

    public void itReturnsTheRight() {
        when(theView.getRight()).thenReturn(123);
        assertThat(integer("right"), is(123));
    }
    
    @Test
    public void itReturnsTheBottom() {
        when(theView.getBottom()).thenReturn(123);
        assertThat(integer("bottom"), is(123));
    }
    
    private int integer(final String field) {
        return serialize().get(field).getAsInt();
    }

    private String string(final String field) {
        return serialize().get(field).getAsString();
    }
    
    private int[] integerArray(final String field) {
        final JsonArray jsonArray = serialize().get(field).getAsJsonArray();
        int[] integers = new int[jsonArray.size()];
        for(int index = 0; index < integers.length; index++) {
            integers[index] = jsonArray.get(index).getAsInt();
        }
        return integers;
    }

    private JsonObject serialize() {
        JsonObject json = (JsonObject)viewSerializer.serialize(theView, null, null);
        return json;