@Test(groups = "fast")
public void shouldTrustTheGivenTaxFieldsOfInvoices() {
// Given
UUID otherItemId = uuidOtherThan(item0.get().getId(), item1.get().getId(), item3.get().getId());
SetMultimap<UUID, CustomField> taxFieldsOfInvoices = ImmutableSetMultimap.<UUID, CustomField> builder()//
// Tax codes on other item that does not exists in invoice
.put(invoice.getId(), new CustomFieldBuilder()//
.withObjectType(INVOICE_ITEM).withObjectId(otherItemId)//
.withFieldName("taxCodes").withFieldValue("taxC")//
.build())//
.build();
TaxCodeService taxCodeService = new TaxCodeService(catalog, cfg, taxFieldsOfInvoices);
// When
SetMultimap<UUID, TaxCode> taxCodesOfInvoiceItems = taxCodeService.findExistingTaxCodes(invoice);
// Then
assertEquals(taxCodesOfInvoiceItems, ImmutableSetMultimap.<UUID, TaxCode> builder()//
.put(otherItemId, taxC)//
.build());
}
TestTaxCodeService.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:killbill-simple-tax-plugin
作者:
评论列表
文章目录