Skip to content

Commit 8768555

Browse files
fixed failing tests
1 parent 356ccb8 commit 8768555

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/JsonRpc/RequestRouter.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public IDisposable Add(IJsonRpcHandler handler)
2222
return _collection.Add(handler);
2323
}
2424

25-
private IHandlerDescriptor GetDescriptor(IMethodWithParams instance)
25+
private IHandlerDescriptor FindDescriptor(IMethodWithParams instance)
2626
{
2727
return _collection.FirstOrDefault(x => x.Method == instance.Method);
2828
}
@@ -91,12 +91,12 @@ protected virtual async Task<ErrorResponse> RouteRequest(IHandlerDescriptor hand
9191

9292
public IHandlerDescriptor GetDescriptor(Notification notification)
9393
{
94-
return GetDescriptor(notification);
94+
return FindDescriptor(notification);
9595
}
9696

9797
public IHandlerDescriptor GetDescriptor(Request request)
9898
{
99-
return GetDescriptor(request);
99+
return FindDescriptor(request);
100100
}
101101

102102
Task IRequestRouter.RouteNotification(Notification notification)

test/JsonRpc.Tests/MediatorTestsNotificationHandler.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public async Task ExecutesHandler()
1919
var exitHandler = Substitute.For<IExitHandler>();
2020

2121
var collection = new HandlerCollection { exitHandler };
22-
var mediator = new RequestRouter(collection);
22+
IRequestRouter mediator = new RequestRouter(collection);
2323

2424
var notification = new Notification("exit", null);
2525

26-
await mediator.RouteNotification(null, notification);
26+
await mediator.RouteNotification(notification);
2727

2828
await exitHandler.Received(1).Handle();
2929
}

0 commit comments

Comments
 (0)