public void Trivial()
        {
            var serviceDescription = new ServiceDescriptionBuilder(new MethodDescriptionBuilder()).Build(typeof(ITrivialService));
            var path = new ServicePath("MyService", "MyMethod");
            var handler = Substitute.For<IHandler>();
            factory.CreateHandler(serviceDescription, path).Returns(handler);

            var handler1 = container.GetHandler(serviceDescription, path);
            var handler2 = container.GetHandler(serviceDescription, path);

            Assert.That(handler1, Is.EqualTo(handler2));
        }
 public void Setup()
 {
     rpcClientServer = Substitute.For<IRpcClientServer>();
     serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder());
 }
 public void Setup()
 {
     codecContainer = new CodecContainer();
     factory = new ServiceMethodHandlerFactory(codecContainer);
     service = Substitute.For<IGlobalServiceImplementation>();
     var serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder());
     var globalServiceDescription =  serviceDescriptionBuilder.Build(typeof(IGlobalService));
     globalServiceImplementationInfo =
         new ServiceImplementationInfo(typeof(IGlobalService), globalServiceDescription, service);
 }
 public void Setup()
 {
     methodDescriptionBuilder = Substitute.For<IMethodDescriptionBuilder>();
     builder = new ServiceDescriptionBuilder(methodDescriptionBuilder);
 }