public void Should_Have_CorrectParams(Type requestHandler, string key, Type expected)
        {
            var handler = new HandlerCollection();

            handler.Add((IJsonRpcHandler)Substitute.For(new Type[] { requestHandler }, new object[0]));
            handler.First(x => x.Method == key).Params.Should().IsSameOrEqualTo(expected);
        }
Beispiel #2
0
        public void Should_Have_CorrectParams(Type requestHandler, string key, Type expected)
        {
            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.First(x => x.Method == key).Params.Should().IsSameOrEqualTo(expected);
        }
Beispiel #3
0
        public void Should_Have_CorrectParams(Type requestHandler, string key, Type expected)
        {
            var handler = new HandlerCollection(new ServiceCollection().BuildServiceProvider())
            {
                (IJsonRpcHandler)Substitute.For(new[] { requestHandler }, new object[0])
            };

            handler.First(x => x.Method == key).Params.Should().IsSameOrEqualTo(expected);
        }