Skip to content

Commit

Permalink
delete the demo source code and update the unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
kexianjun committed Sep 7, 2018
1 parent 6d1be10 commit cd46b4f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,16 @@ public void testServiceClass() {

@Test
public void testServiceAnnotation() {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(ConfigTest.class.getPackage().getName().replace('.', '/') + "/service-annotation.xml");
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(ConfigTest.class.getPackage().getName().replace('.', '/') + "/service-class.xml");
ctx.start();
try {
DemoService demoService = refer("dubbo://127.0.0.1:20887");
String hello = demoService.sayName("hello");
assertEquals("say:hello", hello);
ReferenceConfig<HelloService> reference = new ReferenceConfig<HelloService>();
reference.setApplication(new ApplicationConfig("consumer"));
reference.setRegistry(new RegistryConfig(RegistryConfig.NO_AVAILABLE));
reference.setInterface(HelloService.class);
reference.setUrl("dubbo://127.0.0.1:20887");
String hello = reference.get().sayHello("hello");
assertEquals("Hello, hello", hello);
} finally {
ctx.stop();
ctx.close();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
*/
package org.apache.dubbo.config.spring.impl;

import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.config.spring.api.HelloService;


@Service(interfaceName = "org.apache.dubbo.config.spring.api.HelloService")
public class HelloServiceImpl implements HelloService {

public String sayHello(String name) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@
class="org.apache.dubbo.config.spring.impl.DemoServiceImpl">
<property name="prefix" value="welcome:"/>
</dubbo:service>
<dubbo:annotation package="org.apache.dubbo.config.spring.impl"/>

</beans>

0 comments on commit cd46b4f

Please sign in to comment.