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