mirror of
https://github.com/google/nomulus.git
synced 2025-07-26 04:28:34 +02:00
Refer to Datastore everywhere correctly by its capitalized form
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147479683
This commit is contained in:
parent
a8cf81bca2
commit
cdadb54acd
123 changed files with 232 additions and 235 deletions
|
@ -125,7 +125,7 @@ public class EntityTestCase {
|
|||
.that(indexed)
|
||||
.isEqualTo(results != 0);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// If the field's type was not indexable (because it's not a supported datastore type) then
|
||||
// If the field's type was not indexable (because it's not a supported Datastore type) then
|
||||
// this error will be thrown. If we expected no indexing, that's fine. Otherwise, fail.
|
||||
if (indexed || !e.getMessage().endsWith(" is not a supported property type.")) {
|
||||
assert_().fail(String.format("%s was %sindexed", fieldPath, indexed ? "not " : ""));
|
||||
|
|
|
@ -41,7 +41,7 @@ public class SchemaVersionTest {
|
|||
private static final String UPDATE_INSTRUCTIONS = Joiner.on('\n').join(
|
||||
"",
|
||||
"-------------------------------------------------------------------------------",
|
||||
"Your changes affect the datastore schema. To update the checked-in schema, run:",
|
||||
"Your changes affect the Datastore schema. To update the checked-in schema, run:",
|
||||
UPDATE_COMMAND,
|
||||
"");
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ public class TimedTransitionPropertyTest {
|
|||
// Just for testing, don't extract transitions from a TimedTransitionProperty in real code.
|
||||
Set<Map.Entry<DateTime, StringTimedTransition>> transitions = timedString.entrySet();
|
||||
timedString = forMapify("0", StringTimedTransition.class);
|
||||
// Simulate a load from datastore by clearing and then re-inserting the original transitions.
|
||||
// Simulate a load from Datastore by clearing and then re-inserting the original transitions.
|
||||
timedString.clear();
|
||||
for (Map.Entry<DateTime, StringTimedTransition> transition : transitions) {
|
||||
timedString.put(transition.getKey(), transition.getValue());
|
||||
|
@ -160,7 +160,7 @@ public class TimedTransitionPropertyTest {
|
|||
@Test
|
||||
public void testFailure_noValuesAfterSimulatedEmptyLoad() throws Exception {
|
||||
timedString = forMapify("0", StringTimedTransition.class);
|
||||
// Simulate a load from datastore by clearing, but don't insert any transitions.
|
||||
// Simulate a load from Datastore by clearing, but don't insert any transitions.
|
||||
timedString.clear();
|
||||
thrown.expect(IllegalStateException.class);
|
||||
timedString.checkValidity();
|
||||
|
@ -171,7 +171,7 @@ public class TimedTransitionPropertyTest {
|
|||
// Just for testing, don't extract transitions from a TimedTransitionProperty in real code.
|
||||
StringTimedTransition transition1 = timedString.get(DATE_1);
|
||||
timedString = forMapify("0", StringTimedTransition.class);
|
||||
// Simulate a load from datastore by clearing and inserting transitions, but deliberately
|
||||
// Simulate a load from Datastore by clearing and inserting transitions, but deliberately
|
||||
// omit a transition corresponding to START_OF_TIME.
|
||||
timedString.clear();
|
||||
timedString.put(DATE_1, transition1);
|
||||
|
|
|
@ -186,7 +186,7 @@ public class PremiumListTest {
|
|||
Map<String, PremiumListEntry> entries = pl.getPremiumListEntries();
|
||||
assertThat(entries.keySet()).containsExactly("test");
|
||||
assertThat(PremiumList.get("pl").get().getPremiumListEntries()).isEqualTo(entries);
|
||||
// Save again with no changes, and clear the cache to force a re-load from datastore.
|
||||
// Save again with no changes, and clear the cache to force a re-load from Datastore.
|
||||
pl.saveAndUpdateEntries();
|
||||
ofy().clearSessionCache();
|
||||
assertThat(PremiumList.get("pl").get().getPremiumListEntries()).isEqualTo(entries);
|
||||
|
@ -203,7 +203,7 @@ public class PremiumListTest {
|
|||
Map<String, PremiumListEntry> entries = pl.getPremiumListEntries();
|
||||
assertThat(entries.keySet()).containsExactly("test");
|
||||
assertThat(PremiumList.get("pl").get().getPremiumListEntries()).isEqualTo(entries);
|
||||
// Save again with description changed, and clear the cache to force a re-load from datastore.
|
||||
// Save again with description changed, and clear the cache to force a re-load from Datastore.
|
||||
pl.asBuilder().setDescription("foobar").build().saveAndUpdateEntries();
|
||||
ofy().clearSessionCache();
|
||||
assertThat(PremiumList.get("pl").get().getPremiumListEntries()).isEqualTo(entries);
|
||||
|
|
|
@ -61,7 +61,7 @@ public class SignedMarkRevocationListTest {
|
|||
|
||||
@Test
|
||||
public void testEmpty() throws Exception {
|
||||
// When the datastore is empty, it should give us an empty thing.
|
||||
// When Datastore is empty, it should give us an empty thing.
|
||||
assertThat(SignedMarkRevocationList.get())
|
||||
.isEqualTo(SignedMarkRevocationList.create(
|
||||
START_OF_TIME, ImmutableMap.<String, DateTime>of()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue