1 package com.xtremelabs.robolectric.shadows; 2 3 import java.lang.reflect.Field; 4 5 import android.content.ContentProviderResult; 6 import android.net.Uri; 7 8 import com.xtremelabs.robolectric.internal.Implements; 9 import com.xtremelabs.robolectric.internal.RealObject; 10 11 @Implements(ContentProviderResult.class) 12 public class ShadowContentProviderResult { 13 @RealObject ContentProviderResult realResult; 14 __constructor__(Uri uri)15 public void __constructor__(Uri uri) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { 16 Field field = realResult.getClass().getField("uri"); 17 field.setAccessible(true); 18 field.set(realResult, uri); 19 } 20 __constructor__(int count)21 public void __constructor__(int count) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { 22 Field field = realResult.getClass().getField("count"); 23 field.setAccessible(true); 24 field.set(realResult, count); 25 } 26 }