Hi Oleg,
I've never used Guice or RoboGuice, so I might be taking a wrong turn here, but take a look at http://code.google.com/p/roboguice/source/browse/astroboy/src/roboguice/astroboy/AstroboyModule.java
In particular, have a look at line 40: bind(TalkingThing.class).to(TalkingThingMockImpl.class);
AstroboyModule (eventually) extends com.google.inject.AbstractModule
Instead of TalkingThing and TalkingThingMockImpl, you could provide MyDao and MyMockDao, where an instance of MyMockDao would just pass all calls into dao (AndroidMock.createMock( MyDao.class )). You could even try MyDaoDelegateSubclass.class instead of MyMockDao although you're starting to get into the bowels of AndroidMock at that point and may well find more trouble than it's worth.
Even simpler may be to add a setDao on MyManager to allow you to set MyManager.dao. Your test would then become:
@UsesMocks(MyDao.class)
public void testMock() {
Account account = new Account();
account.setName("TestAccount");
dao = AndroidMock.createMock(MyDao.class);
Android.expect(dao.getSomth("test")).andReturn(account);
AndroidMock.replay(dao);
manager.setDao(dao);
Account accountFromDB = manager.doSmth("test");
assertEquals(account.getName(), accountFromDB.getName());
}
Hope that helps,
Steve