What about the code which reads the data? How we will test it if can't
persist the data in test cases.
Sent from my iPhone
On 21 May 2010, at 15:33, Unni Panicker <o4tec...@gmail.com> wrote:
When you run the server , data gets persisted and u can view the
data using the console http://localhost:8888/_ah/admin.
But for the test utilities it is not persisted. It is preferable
that data is not persisted for two reasons.
1. It is better to start each test from a clean plate.
2. Persistence itself is not your code and there is no need to test
it.
I believe this is the thinking behind it. Even when I tried with a
backing file, I could not retrieve the objects that I persisted in
my previous method call. If any one has a better explanation, please.
On Fri, May 21, 2010 at 3:11 AM, bufferings <bufferi...@gmail.com>
wrote:
hi
I posted a sample with @BeforeClass and @AfterClass a few minutes ago.
FYI:
Somehow the setStoreDelayMs(1) leaves the data in the file, if you
call helper.tearDown().
http://groups.google.com/group/google-appengine-java/browse_thread/thread/68fa07d96fe929e8
==
@Before
public void setUp() {
LocalDatastoreServiceTestConfig config = new
LocalDatastoreServiceTestConfig();
config.setNoStorage(false);
config.setStoreDelayMs(1);
helper = new LocalServiceTestHelper(config);
helper.setUp();
}
@After
public void tearDown() {
helper.tearDown();
// ApiProxy.setDelegate(null);
// ApiProxy.setEnvironmentForCurrentThread(null);
}
==
--
You received this message because you are subscribed to the Google
Groups "Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
.
To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com
.
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en
.
--
You received this message because you are subscribed to the Google
Groups "Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
.
To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com
.
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en
.
--
You received this message because you are subscribed to the Google Groups "Google
App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.