Closed yu199195 closed 3 years ago
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>${alibaba.dubbo.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<scope>test</scope>
</dependency
package org.dromara.soul.spring.boot.starter.plugin.alibaba.dubbo;
import org.dromara.soul.common.enums.PluginEnum;
import org.dromara.soul.plugin.alibaba.dubbo.response.DubboResponsePlugin;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(
classes = {
AlibabaDubboPluginConfiguration.class,
AlibabaDubboPluginConfigurationTest.class
},
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT
)
@EnableAutoConfiguration
public class AlibabaDubboPluginConfigurationTest {
@Autowired
private DubboResponsePlugin dubboResponsePlugin;
@Test
public void testAlibabaDubboPlugin() {
Assert.assertEquals(PluginEnum.RESPONSE.getCode(), dubboResponsePlugin.getOrder());
}
}
get