package com.xtremelabs.robolectric.shadows;


import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.xtremelabs.robolectric.Robolectric;
import com.xtremelabs.robolectric.WithTestDefaultsRunner;

import android.hardware.Camera;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;

@RunWith(WithTestDefaultsRunner.class)
public class CameraSizeTest {
	
	private Camera.Size cameraSize;

	@Before
	public void setUp() throws Exception {
        Robolectric.bindDefaultShadowClasses();
		cameraSize = Robolectric.newInstanceOf(Camera.class).new Size(480, 320);
	}
	
	@Test
	public void testConstructor() throws Exception {
		assertThat(cameraSize.width, equalTo(480));
		assertThat(cameraSize.height, equalTo(320));
	}
	
	@Test
	public void testSetWidth() throws Exception {
		assertThat(cameraSize.width, not(equalTo(640)));
		cameraSize.width = 640;
		assertThat(cameraSize.width, equalTo(640));
	}

	@Test
	public void testSetHeight() throws Exception {
		assertThat(cameraSize.height, not(equalTo(480)));
		cameraSize.height = 480;
		assertThat(cameraSize.height, equalTo(480));
	}

}

package com.xtremelabs.robolectric.shadows;


import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.xtremelabs.robolectric.Robolectric;
import com.xtremelabs.robolectric.WithTestDefaultsRunner;

import android.hardware.Camera;

import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;

@RunWith(WithTestDefaultsRunner.class)
public class CameraSizeTest {
	
	private Camera.Size cameraSize;

	@Before
	public void setUp() throws Exception {
        Robolectric.bindDefaultShadowClasses();
		cameraSize = Robolectric.newInstanceOf(Camera.class).new Size(480, 320);
	}
	
	@Test
	public void testConstructor() throws Exception {
		assertThat(cameraSize.width, equalTo(480));
		assertThat(cameraSize.height, equalTo(320));
	}
	
	@Test
	public void testSetWidth() throws Exception {
		assertThat(cameraSize.width, not(equalTo(640)));
		cameraSize.width = 640;
		assertThat(cameraSize.width, equalTo(640));
	}

	@Test
	public void testSetHeight() throws Exception {
		assertThat(cameraSize.height, not(equalTo(480)));
		cameraSize.height = 480;
		assertThat(cameraSize.height, equalTo(480));
	}

}

fix imports