Search in sources :

Example 1 with LocalizationUtil

use of org.pentaho.metadata.util.LocalizationUtil in project pentaho-platform by pentaho.

the class PentahoMetadataDomainRepositoryTest method testInitialization.

@Test
public void testInitialization() {
    try {
        createDomainRepository(null);
        fail("An exception should be thrown");
    } catch (Exception success) {
    // ignored
    }
    try {
        createDomainRepository(null, null, null, null);
        fail("An exception should be thrown");
    } catch (Exception success) {
    // ignored
    }
    final RepositoryUtils repositoryUtils = new RepositoryUtils(repository);
    final XmiParser xmiParser = new XmiParser();
    final LocalizationUtil localizationUtil = new LocalizationUtil();
    final PentahoMetadataDomainRepository repo = createDomainRepository(repository, repositoryUtils, xmiParser, localizationUtil);
    assertEquals(repository, repo.getRepository());
    assertEquals(repositoryUtils, repo.getRepositoryUtils());
    assertEquals(xmiParser, repo.getXmiParser());
    assertEquals(localizationUtil, repo.getLocalizationUtil());
}
Also used : RepositoryUtils(org.pentaho.platform.repository2.unified.RepositoryUtils) LocalizationUtil(org.pentaho.metadata.util.LocalizationUtil) XmiParser(org.pentaho.metadata.util.XmiParser) DomainStorageException(org.pentaho.metadata.repository.DomainStorageException) DomainIdNullException(org.pentaho.metadata.repository.DomainIdNullException) DomainAlreadyExistsException(org.pentaho.metadata.repository.DomainAlreadyExistsException) IOException(java.io.IOException) Test(org.junit.Test)

Aggregations

IOException (java.io.IOException)1 Test (org.junit.Test)1 DomainAlreadyExistsException (org.pentaho.metadata.repository.DomainAlreadyExistsException)1 DomainIdNullException (org.pentaho.metadata.repository.DomainIdNullException)1 DomainStorageException (org.pentaho.metadata.repository.DomainStorageException)1 LocalizationUtil (org.pentaho.metadata.util.LocalizationUtil)1 XmiParser (org.pentaho.metadata.util.XmiParser)1 RepositoryUtils (org.pentaho.platform.repository2.unified.RepositoryUtils)1