Пример #1
0
        protected internal virtual TenantQuery setUpMockQuery(Tenant tenant)
        {
            TenantQuery query = mock(typeof(TenantQuery));

            when(query.tenantId(anyString())).thenReturn(query);
            when(query.singleResult()).thenReturn(tenant);

            when(identityServiceMock.createTenantQuery()).thenReturn(query);

            return(query);
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setupData()
        public virtual void setupData()
        {
            identityServiceMock            = mock(typeof(IdentityService));
            authorizationServiceMock       = mock(typeof(AuthorizationService));
            processEngineConfigurationMock = mock(typeof(ProcessEngineConfiguration));

            // mock identity service
            when(processEngine.IdentityService).thenReturn(identityServiceMock);
            // authorization service
            when(processEngine.AuthorizationService).thenReturn(authorizationServiceMock);
            // process engine configuration
            when(processEngine.ProcessEngineConfiguration).thenReturn(processEngineConfigurationMock);

            mockTenant = MockProvider.createMockTenant();
            mockQuery  = setUpMockQuery(mockTenant);
        }