test_class.declarator: context
test_class.modifier: private
test_class.original_string: private BoundedContext context;
test_class.type: BoundedContext
test_class.var_name: context
test_class.declarator: documentRepository
test_class.modifier: private
test_class.original_string: private DocumentRepository documentRepository;
test_class.type: DocumentRepository
test_class.var_name: documentRepository
test_class.declarator: editHistoryRepository
test_class.modifier: private
test_class.original_string: private EditHistoryRepository editHistoryRepository;
test_class.type: EditHistoryRepository
test_class.var_name: editHistoryRepository
test_class.file: server/src/test/java/io/spine/server/integration/ThirdPartyContextTest.java
test_class.identifier: ThirdPartyContextTest
test_case.body: @Test
      @DisplayName("in a multitenant environment")
      void multitenant() {
          DocumentRepository documentRepository = new DocumentRepository();
          BoundedContextBuilder
                  .assumingTests(true)
                  .add(documentRepository)
                  .build();
          UserId johnDoe = userId();
          TenantId acmeCorp = TenantId
                  .newBuilder()
                  .setDomain(InternetDomain.newBuilder()
                                           .setValue("acme.com"))
                  .build();
          TenantId cyberdyne = TenantId
                  .newBuilder()
                  .setDomain(InternetDomain.newBuilder()
                                           .setValue("cyberdyne.com"))
                  .build();
          DocumentId documentId = DocumentId.generate();
          OpenOfficeDocumentUploaded importEvent = OpenOfficeDocumentUploaded
                  .newBuilder()
                  .setId(documentId)
                  .setText("Daily report")
                  .build();
          postForTenant(acmeCorp, johnDoe, importEvent);
  
          Optional<DocumentAggregate> acmeDailyReport = TenantAwareRunner
                  .with(acmeCorp)
                  .evaluate(() -> documentRepository.find(documentId));
          assertThat(acmeDailyReport).isPresent();
  
          Optional<DocumentAggregate> cyberdyneDailyReport = TenantAwareRunner
                  .with(cyberdyne)
                  .evaluate(() -> documentRepository.find(documentId));
          assertThat(cyberdyneDailyReport).isEmpty();
      }
test_case.class_method_signature: ThirdPartyContextTest.multitenant()
test_case.full_signature: @Test @DisplayName("in a multitenant environment") void multitenant()
test_case.identifier: multitenant
test_case.invocations: build add assumingTests userId build setDomain newBuilder setValue newBuilder build setDomain newBuilder setValue newBuilder generate build setText setId newBuilder postForTenant evaluate with find isPresent assertThat evaluate with find isEmpty assertThat
test_case.modifiers: @Test @DisplayName("in a multitenant environment")
test_case.parameters: ()
test_case.return: void
test_case.signature: void multitenant()
focal_class.declarator: context
focal_class.modifier: private final
focal_class.original_string: private final BoundedContext context;
focal_class.type: BoundedContext
focal_class.var_name: context
focal_class.declarator: producerId
focal_class.modifier: private final
focal_class.original_string: private final Any producerId;
focal_class.type: Any
focal_class.var_name: producerId
focal_class.file: server/src/main/java/io/spine/server/integration/ThirdPartyContext.java
focal_class.identifier: ThirdPartyContext
focal_class.interfaces: implements Closeable
focal_class.class_method_signature: ThirdPartyContext.singleTenant(String name)
focal_class.full_signature: public static ThirdPartyContext singleTenant(String name)
focal_class.identifier: singleTenant
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: ThirdPartyContext
focal_class.signature: ThirdPartyContext singleTenant(String name)
focal_class.class_method_signature: ThirdPartyContext.multitenant(String name)
focal_class.full_signature: public static ThirdPartyContext multitenant(String name)
focal_class.identifier: multitenant
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: ThirdPartyContext
focal_class.signature: ThirdPartyContext multitenant(String name)
focal_class.class_method_signature: ThirdPartyContext.newContext(String name, boolean multitenant)
focal_class.full_signature: private static ThirdPartyContext newContext(String name, boolean multitenant)
focal_class.identifier: newContext
focal_class.modifiers: private static
focal_class.parameters: (String name, boolean multitenant)
focal_class.return: ThirdPartyContext
focal_class.signature: ThirdPartyContext newContext(String name, boolean multitenant)
focal_class.class_method_signature: ThirdPartyContext.ThirdPartyContext(BoundedContext context)
focal_class.full_signature: private  ThirdPartyContext(BoundedContext context)
focal_class.identifier: ThirdPartyContext
focal_class.modifiers: private
focal_class.parameters: (BoundedContext context)
focal_class.signature:  ThirdPartyContext(BoundedContext context)
focal_class.class_method_signature: ThirdPartyContext.emittedEvent(EventMessage eventMessage, ActorContext actorContext)
focal_class.full_signature: public void emittedEvent(EventMessage eventMessage, ActorContext actorContext)
focal_class.identifier: emittedEvent
focal_class.modifiers: public
focal_class.parameters: (EventMessage eventMessage, ActorContext actorContext)
focal_class.return: void
focal_class.signature: void emittedEvent(EventMessage eventMessage, ActorContext actorContext)
focal_class.class_method_signature: ThirdPartyContext.emittedEvent(EventMessage eventMessage, UserId userId)
focal_class.full_signature: public void emittedEvent(EventMessage eventMessage, UserId userId)
focal_class.identifier: emittedEvent
focal_class.modifiers: public
focal_class.parameters: (EventMessage eventMessage, UserId userId)
focal_class.return: void
focal_class.signature: void emittedEvent(EventMessage eventMessage, UserId userId)
focal_class.class_method_signature: ThirdPartyContext.checkTenant(ActorContext actorContext, EventMessage event)
focal_class.full_signature: private void checkTenant(ActorContext actorContext, EventMessage event)
focal_class.identifier: checkTenant
focal_class.modifiers: private
focal_class.parameters: (ActorContext actorContext, EventMessage event)
focal_class.return: void
focal_class.signature: void checkTenant(ActorContext actorContext, EventMessage event)
focal_class.class_method_signature: ThirdPartyContext.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ThirdPartyContext.isOpen()
focal_class.full_signature: @Override public boolean isOpen()
focal_class.identifier: isOpen
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isOpen()
focal_method.body: public static ThirdPartyContext multitenant(String name) {
          return newContext(name, true);
      }
focal_method.class_method_signature: ThirdPartyContext.multitenant(String name)
focal_method.full_signature: public static ThirdPartyContext multitenant(String name)
focal_method.identifier: multitenant
focal_method.invocations: newContext
focal_method.modifiers: public static
focal_method.parameters: (String name)
focal_method.return: ThirdPartyContext
focal_method.signature: ThirdPartyContext multitenant(String name)