summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/aai/sparky/synchronizer/SyncHelperTest.java
blob: b4305cb80fb1fba8a1fc9dd5239891780100979e (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
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());
}

}