File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
dubbo-config/dubbo-config-api/src
main/java/com/alibaba/dubbo/config
test/java/com/alibaba/dubbo/config Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -820,6 +820,16 @@ public void setGeneric(String generic) {
820820 }
821821 }
822822
823+ @ Override
824+ public void setMock (Boolean mock ) {
825+ throw new IllegalArgumentException ("mock doesn't support on provider side" );
826+ }
827+
828+ @ Override
829+ public void setMock (String mock ) {
830+ throw new IllegalArgumentException ("mock doesn't support on provider side" );
831+ }
832+
823833 public List <URL > getExportedUrls () {
824834 return urls ;
825835 }
Original file line number Diff line number Diff line change @@ -194,6 +194,18 @@ public void testGeneric2() throws Exception {
194194 service .setGeneric ("illegal" );
195195 }
196196
197+ @ Test (expected = IllegalArgumentException .class )
198+ public void testMock () throws Exception {
199+ ServiceConfig service = new ServiceConfig ();
200+ service .setMock ("true" );
201+ }
202+
203+ @ Test (expected = IllegalArgumentException .class )
204+ public void testMock2 () throws Exception {
205+ ServiceConfig service = new ServiceConfig ();
206+ service .setMock (true );
207+ }
208+
197209 @ Test
198210 public void testUniqueServiceName () throws Exception {
199211 ServiceConfig <Greeting > service = new ServiceConfig <Greeting >();
You can’t perform that action at this time.
0 commit comments