Search in sources :

Example 6 with IamConfiguration

use of org.ligoj.app.iam.IamConfiguration in project ligoj-api by ligoj.

the class EmptyIamProviderTest method getConfiguration.

@Test
public void getConfiguration() {
    final IamConfiguration configuration = provider.getConfiguration();
    Assertions.assertNotNull(configuration);
    Assertions.assertNotNull(configuration.getCompanyRepository());
    Assertions.assertNotNull(configuration.getUserRepository());
    Assertions.assertNotNull(configuration.getGroupRepository());
    Assertions.assertEquals("login", configuration.getUserRepository().toUser("login").getId());
}
Also used : IamConfiguration(org.ligoj.app.iam.IamConfiguration) Test(org.junit.jupiter.api.Test)

Example 7 with IamConfiguration

use of org.ligoj.app.iam.IamConfiguration in project ligoj-api by ligoj.

the class TestAbstractAppTest method coverage.

/**
 * Only there fore coverage, no Spring involved.
 */
@Test
public void coverage() {
    iamProvider = Mockito.mock(IamProvider.class);
    IamConfiguration configuration = Mockito.mock(IamConfiguration.class);
    Mockito.when(iamProvider.getConfiguration()).thenReturn(configuration);
    em = Mockito.mock(EntityManager.class);
    getUser();
    getCompany();
    getGroup();
    persistSystemEntities();
}
Also used : EntityManager(javax.persistence.EntityManager) IamProvider(org.ligoj.app.iam.IamProvider) IamConfiguration(org.ligoj.app.iam.IamConfiguration) Test(org.junit.jupiter.api.Test)

Aggregations

IamConfiguration (org.ligoj.app.iam.IamConfiguration)7 Test (org.junit.jupiter.api.Test)5 IamProvider (org.ligoj.app.iam.IamProvider)2 Node (org.ligoj.app.model.Node)2 Parameter (org.ligoj.app.model.Parameter)2 ParameterValue (org.ligoj.app.model.ParameterValue)2 Project (org.ligoj.app.model.Project)2 Subscription (org.ligoj.app.model.Subscription)2 IOException (java.io.IOException)1 StandardCharsets (java.nio.charset.StandardCharsets)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Date (java.util.Date)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Optional (java.util.Optional)1 Function (java.util.function.Function)1 Collectors (java.util.stream.Collectors)1 EntityManager (javax.persistence.EntityManager)1