parent
08ea6568c4
commit
542478e5e3
|
@ -1,5 +1,6 @@
|
|||
package com.dispose.manager;
|
||||
|
||||
import com.dispose.Global.InitTestEnvironment;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -8,6 +9,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.Rollback;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
|
@ -16,29 +18,41 @@ import com.dispose.pojo.entity.DisposeDevice;
|
|||
|
||||
import junit.framework.TestCase;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author phoenix
|
||||
* @date 2020年4月27日
|
||||
* The type Dispose device manager test.
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@Slf4j
|
||||
public class DisposeDeviceManagerTest {
|
||||
@Transactional
|
||||
@Rollback
|
||||
public class DisposeDeviceManagerTest extends InitTestEnvironment {
|
||||
|
||||
/**
|
||||
* The Dispose device mapper.
|
||||
*/
|
||||
@Resource
|
||||
private DisposeDeviceMapper disposeDeviceMapper;
|
||||
|
||||
/**
|
||||
* The Dispose device manager.
|
||||
*/
|
||||
@Resource
|
||||
private DisposeDeviceManager disposeDeviceManager;
|
||||
|
||||
/**
|
||||
* Sets up.
|
||||
*/
|
||||
@Before
|
||||
public void setUp() {
|
||||
ReflectionTestUtils.setField(disposeDeviceManager, "disposeDeviceMapper", disposeDeviceMapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test dispose device manager.
|
||||
*/
|
||||
@Test
|
||||
public void testDisposeDeviceManager() {
|
||||
log.info("DisposeDeviceManager 单元测试");
|
||||
|
|
Loading…
Reference in New Issue