コード例 #1
0
 protected void assertTestCurrency(int i, BadgerEntity<Currency> currency) {
   int j = i % NUM_CURRENCIES;
   Currency message = currency.getMessage();
   assertEquals("US Dollar" + j, message.getName());
   assertEquals(ALL_STRINGS_3_LIST.get(j), message.getAlphabeticCode());
   assertEquals(j, message.getNumericCode());
   assertEquals(2, message.getMinorUnit());
 }
コード例 #2
0
 protected List<BadgerEntity<Currency>> getTestCurrenciesForCreate() {
   ImmutableList.Builder<BadgerEntity<Currency>> builder = ImmutableList.builder();
   for (int i = 0; i < NUM_CURRENCIES; i++) {
     builder.add(
         getBadgerCore()
             .getBadgerEntity(
                 Currency.newBuilder()
                     .setName("US Dollar" + i)
                     .setAlphabeticCode(ALL_STRINGS_3_LIST.get(i))
                     .setNumericCode(i)
                     .setMinorUnit(2)
                     .build()));
   }
   return builder.build();
 }