package com.eactive.eai.transformer.function;

import static org.junit.Assert.assertTrue;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.jdbc.Sql;

import com.eactive.eai.common.lifecycle.LifecycleException;
import com.eactive.eai.transformer.function.jpa.TransformJPATestConfiguration;

@DataJpaTest
@ContextConfiguration(classes = { TransformJPATestConfiguration.class })
@Sql("/com/eactive/eai/transformer/init_function.sql")
class FunctionManagerTest {

	@Autowired
	FunctionManager functionManager;

	@Test
	void testLoad() throws LifecycleException {
		// when
		functionManager.start();
		// then
		assertTrue(functionManager.isStarted());
	}

}
