Alright, well I was able to get the DialogFragment from the FragmentManager and the real dialog from that fragment, however when trying to click on a button via a ShadowDialog, I get an NPE.
java.lang.NullPointerException
at android.view.LayoutInflater.from(LayoutInflater.java:210)
at org.robolectric.shadows.ShadowDialog.clickOnText(ShadowDialog.java:105
Looking at the robolectric code, it's using a context in ShadowDialog that never seems to be set as far as I can tell. If I modify robolectric to make that context public and set it to my activity (created with Robolectric), instead of getting an NPE I'll get a Resources.NotFoundException:
android.content.res.Resources$NotFoundException: unknown resource 0
at org.robolectric.shadows.ShadowAssetManager.getAndResolve(ShadowAssetManager.java:258)
at org.robolectric.shadows.ShadowAssetManager.getResourceValue(ShadowAssetManager.java:85)
at android.content.res.AssetManager.getResourceValue(AssetManager.java)
at android.content.res.Resources.getValue(Resources.java:1009)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2098)
at android.content.res.Resources.getLayout(Resources.java:852)
at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at org.robolectric.shadows.ShadowDialog.clickOnText(ShadowDialog.java:105)
At this point I'm pretty stumped. I'm not sure how to get the ShadowDialog to be able to click on the button that I need to have clicked.