Skip to content

Commit

Permalink
Polish /apache#4687 : Remove the duplicated test code in dubbo-config…
Browse files Browse the repository at this point in the history
…-spring
  • Loading branch information
mercyblitz committed Jul 29, 2019
1 parent 87e88e2 commit 201af8e
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 1,204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
import org.apache.dubbo.config.ProviderConfig;
import org.apache.dubbo.config.RegistryConfig;

import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.PropertySource;

import java.util.Map;

/**
* {@link EnableDubboConfig} Test
*
Expand Down Expand Up @@ -92,6 +95,14 @@ public void testMultiple() {
ApplicationConfig applicationBean3 = context.getBean("applicationBean3", ApplicationConfig.class);
Assertions.assertEquals("dubbo-demo-application3", applicationBean3.getName());

Map<String, ProtocolConfig> protocolConfigs = context.getBeansOfType(ProtocolConfig.class);

for (Map.Entry<String, ProtocolConfig> entry : protocolConfigs.entrySet()) {
String beanName = entry.getKey();
ProtocolConfig protocol = entry.getValue();
Assert.assertEquals(beanName, protocol.getName());
}

}

@EnableDubboConfig
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 201af8e

Please sign in to comment.