use of org.killbill.billing.events.ControlTagDefinitionDeletionInternalEvent in project killbill by killbill.
the class TestTagEventBuilder method testNewControlTagDefinitionDeletionEvent.
@Test(groups = "fast")
public void testNewControlTagDefinitionDeletionEvent() throws Exception {
final UUID tagDefinitionId = ControlTagType.AUTO_PAY_OFF.getId();
final String tagDefinitionName = UUID.randomUUID().toString();
final String tagDefinitionDescription = UUID.randomUUID().toString();
final boolean controlTag = true;
final TagDefinition tagDefinition = new DefaultTagDefinition(tagDefinitionId, tagDefinitionName, tagDefinitionDescription, controlTag);
final UUID userToken = internalCallContext.getUserToken();
final TagEventBuilder tagEventBuilder = new TagEventBuilder();
final TagDefinitionInternalEvent event = tagEventBuilder.newControlTagDefinitionDeletionEvent(tagDefinitionId, new TagDefinitionModelDao(tagDefinition), 1L, 2L, UUID.randomUUID());
Assert.assertTrue(event instanceof ControlTagDefinitionDeletionInternalEvent);
Assert.assertEquals(event, new DefaultControlTagDefinitionDeletionEvent(tagDefinitionId, tagDefinition, 1L, 2L, UUID.randomUUID()));
Assert.assertTrue(event.equals(new DefaultControlTagDefinitionDeletionEvent(tagDefinitionId, tagDefinition, 1L, 2L, UUID.randomUUID())));
verifyTagDefinitionEvent(tagDefinitionId, tagDefinitionName, tagDefinitionDescription, tagDefinition, userToken, event);
}
Aggregations