Closed GoogleCodeExporter closed 8 years ago
What do you mean getting the context? Which context? PowerMock doesn't have a
"context"?!
Original comment by johan.ha...@gmail.com
on 16 Jun 2013 at 5:34
Hi John,
Actually I was talking about application context. Sorry i missed to mention
this. But I got the solution for this.
But , now I have a problem with accessing my application resource(like
res/string) from test application.
Actually, when i try to access my application string using Roboelectric from my
Test application(A Java app), it could not reach up to my application's
res/values/strings.xml. When I try to get the string id from context, it always
gives me string's id as '0'.
Can you please help me on this?
Thanks
Subeer
Original comment by subeer.v...@gmail.com
on 17 Jun 2013 at 7:56
Is this a PowerMock question or Roboletric question!? I can't help you with
roboletric stuff :/
Original comment by johan.ha...@gmail.com
on 17 Jun 2013 at 8:29
Oh is that so! No problem.
Can you please let me know if we would have been using Powermock, then how can
we get the string id from activity's context.
I am getting context from my test application(Java application) like this:
MyActivity myactivity = new MyActivity();
Now , I am using this context(myactivity) to get the stringId of my actual
application from my test application. But it always gives me stringId as 0.
Please help.
Thanks
Original comment by subeer.v...@gmail.com
on 17 Jun 2013 at 10:00
Sorry but I'm not too familiar with Android.
Original comment by johan.ha...@gmail.com
on 18 Jun 2013 at 5:41
Original issue reported on code.google.com by
subeer.v...@gmail.com
on 13 Jun 2013 at 6:04