test
This commit is contained in:
parent
4b12e03cd3
commit
ac4f934e8a
|
@ -0,0 +1,33 @@
|
||||||
|
package com.loafle.overflow.central.module.target.service;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
import com.loafle.overflow.central.spring.AppConfigTest;
|
||||||
|
import com.loafle.overflow.model.target.Target;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
import org.springframework.test.context.TestExecutionListeners;
|
||||||
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
|
||||||
|
import org.springframework.test.context.transaction.TransactionalTestExecutionListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by snoop on 17. 6. 28.
|
||||||
|
*/
|
||||||
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@ContextConfiguration(classes = { AppConfigTest.class })
|
||||||
|
@TestExecutionListeners({ DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class, })
|
||||||
|
public class TargetServiceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CentralTargetService targetService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test() throws Exception {
|
||||||
|
Target t = this.targetService.read(Long.valueOf(1));
|
||||||
|
assertTrue(t.getId() == 1);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user