public void Should_Contain_AllDefinedMethods(Type requestHandler, string key) { var handler = new HandlerCollection(Substitute.For <IResolverContext>(), new HandlerTypeDescriptorProvider(new [] { typeof(HandlerTypeDescriptorProvider).Assembly, typeof(HandlerResolverTests).Assembly })) { (IJsonRpcHandler)Substitute.For(new[] { requestHandler }, new object[0]) }; handler.Should().Contain(x => x.Method == key); }
public void Should_Contain_AllDefinedMethods(Type requestHandler, string key) { var handler = new HandlerCollection(new ServiceCollection().BuildServiceProvider()) { (IJsonRpcHandler)Substitute.For(new[] { requestHandler }, new object[0]) }; handler.Should().Contain(x => x.Method == key); }