Code example for MockContentResolver

Methods: insert

0
	@SmallTest 
	public void testInsertRequestProvidingANotExistingUri() 
	{ 
		try 
		{ 
			contentResolver.insert(Uri.parse("content://uriNotSupported/requestStore"), new ContentValues());
			fail("We should never get here because an IllegalArgumentException should be thrown, because we passed");
		} 
		catch (final IllegalArgumentException iae)
		{ 
			ProviderTestUtils.success(); 
		} 
 
	} 
 
 
	@SmallTest 
	public void testInsertRequestProvidingAWrongUri() 
	{ 
		try 
		{