Code example for Spinner

Methods: getSelectedItemId

0
	} // end of testPreConditions() method definition	 
	 
	// Tests that all input fields are blank and the spinner defaults to "None" on initial load 
	@SmallTest 
	public void testInputAreEmpty() { 
		assertEquals(0, mCategory.getSelectedItemId());
		assertEquals("", mBrandText.getText().toString());
		assertEquals("", mTypeText.getText().toString());
		assertEquals("", mTypeText.getText().toString());
		assertEquals("", mVitolaText.getText().toString());
		assertEquals("", mVitolaText.getText().toString());
	} 
	 
	// Tests that cigar is not saved when inputs are empty 
	@SmallTest 
	public void testConfirmClickNotSaved(){	 
		 
		// clicks confirm button 
		TouchUtils.clickView(this, mConfirmButton);
 
		assertFalse(mActivity.saved);