summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/aai/sparky/synchronizer/SyncHelperTest.java
blob: 4f52361bca1d2c99fc8cce513f7a6cf92027a7bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package org.onap.aai.sparky.synchronizer;

import static org.junit.Assert.assertEquals;

import java.io.File;
import java.io.IOException;

import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.onap.aai.sparky.config.oxm.OxmModelLoader;
import org.onap.aai.sparky.viewandinspect.config.TierSupportUiConstants;

@RunWith(MockitoJUnitRunner.class)
public class SyncHelperTest {

  private SyncHelper syncHelper;

  @BeforeClass
  public static void initBeforeClass() throws IOException {
    String configHomePath =
        (new File(".").getCanonicalPath() + "/src/test/resources/sync").replace('\\', '/');
    TierSupportUiConstants.AJSC_HOME = configHomePath;
    TierSupportUiConstants.CONFIG_HOME = configHomePath;
  }


  @Test
  public void testGetOxmModelLoader() throws Exception {
    syncHelper = new SyncHelper(new OxmModelLoader());
    OxmModelLoader oxmLoader = new OxmModelLoader();
    syncHelper.setOxmModelLoader(oxmLoader);
    assertEquals(oxmLoader, syncHelper.getOxmModelLoader());
  }

}