use of io.spine.core.TenantId in project core-java by SpineEventEngine.
the class CommandFactoryShould method set_tenant_ID_in_commands_when_created_with_tenant_ID.
@Test
public void set_tenant_ID_in_commands_when_created_with_tenant_ID() {
final TenantId tenantId = TenantId.newBuilder().setValue(getClass().getSimpleName()).build();
final ActorRequestFactory mtFactory = ActorRequestFactory.newBuilder().setTenantId(tenantId).setActor(getActor()).setZoneOffset(getZoneOffset()).build();
final Command command = mtFactory.command().create(StringValue.getDefaultInstance());
assertEquals(tenantId, command.getContext().getActorContext().getTenantId());
}
Aggregations