use of com.alipay.sofa.rpc.boot.runtime.binding.BoltBinding in project sofa-boot by sofastack.
the class BoltBindingConverter method convert.
@Override
public RpcBinding convert(SofaReference sofaReferenceAnnotation, SofaReferenceBinding sofaReferenceBindingAnnotation, BindingConverterContext bindingConverterContext) {
RpcBindingParam bindingParam = new BoltBindingParam();
convertReferenceAnnotation(bindingParam, sofaReferenceBindingAnnotation, bindingConverterContext);
return new BoltBinding(bindingParam, bindingConverterContext.getApplicationContext(), bindingConverterContext.isInBinding());
}
use of com.alipay.sofa.rpc.boot.runtime.binding.BoltBinding in project sofa-boot by sofastack.
the class MockBeanConfigTest method testEmptyMockBean.
@Test
public void testEmptyMockBean() {
RpcBindingParam rpcBindingParam = new BoltBindingParam();
RpcBinding rpcBinding = new BoltBinding(rpcBindingParam, null, true);
try {
consumerConfigHelper.getMockRef(rpcBinding, null);
Assert.fail();
} catch (IllegalArgumentException e) {
// success;
}
}
use of com.alipay.sofa.rpc.boot.runtime.binding.BoltBinding in project sofa-boot by alipay.
the class BoltBindingConverter method convert.
@Override
public RpcBinding convert(SofaService sofaServiceAnnotation, SofaServiceBinding sofaServiceBindingAnnotation, BindingConverterContext bindingConverterContext) {
RpcBindingParam bindingParam = new BoltBindingParam();
convertServiceAnnotation(bindingParam, sofaServiceAnnotation, sofaServiceBindingAnnotation, bindingConverterContext);
return new BoltBinding(bindingParam, bindingConverterContext.getApplicationContext(), bindingConverterContext.isInBinding());
}
use of com.alipay.sofa.rpc.boot.runtime.binding.BoltBinding in project sofa-boot by alipay.
the class MockBeanConfigTest method testEmptyMockBean.
@Test
public void testEmptyMockBean() {
RpcBindingParam rpcBindingParam = new BoltBindingParam();
RpcBinding rpcBinding = new BoltBinding(rpcBindingParam, null, true);
try {
consumerConfigHelper.getMockRef(rpcBinding, null);
Assert.fail();
} catch (IllegalArgumentException e) {
// success;
}
}
use of com.alipay.sofa.rpc.boot.runtime.binding.BoltBinding in project sofa-boot by alipay.
the class BoltBindingConverter method convert.
@Override
public RpcBinding convert(SofaReference sofaReferenceAnnotation, SofaReferenceBinding sofaReferenceBindingAnnotation, BindingConverterContext bindingConverterContext) {
RpcBindingParam bindingParam = new BoltBindingParam();
convertReferenceAnnotation(bindingParam, sofaReferenceBindingAnnotation, bindingConverterContext);
return new BoltBinding(bindingParam, bindingConverterContext.getApplicationContext(), bindingConverterContext.isInBinding());
}
Aggregations