public void Setup()
        {
            // It's hard to hand construct a proxy - so we'll go via the proxy generator.
            _fakeDriver = new Mock <IDriverBindings>();
            _fakeDriver.Setup(x => x.Substitutes).Returns(new List <DriverBindings.TypeSubstitution>
            {
                new DriverBindings.TypeSubstitution(typeof(InterceptedType.SubbedType),
                                                    () => new InterceptedType.SubbedType {
                    Val = "Hi"
                })
            });
            _fakeDriver.Setup(x => x.NavigationHandlers).Returns(new List <DriverBindings.IHandle>
            {
                new DriverBindings.Handle <IdAttribute>((s, d) => "an id string"),
                new DriverBindings.Handle <LinkTextAttribute>((s, d) => "a text string"),
                new DriverBindings.Handle <CssSelectorAttribute>((s, d) => new FakeWebElement(s))
            });

            _cfg = new PassengerConfiguration {
                Driver = _fakeDriver.Object
            };
            _proxy = ProxyGenerator.Generate <InterceptedType>(_cfg);
        }
        public void Setup()
        {
            // It's hard to hand construct a proxy - so we'll go via the proxy generator.
            _fakeDriver = new Mock<IDriverBindings>();
            _fakeDriver.Setup(x => x.Substitutes).Returns(new List<DriverBindings.TypeSubstitution>
            {
                new DriverBindings.TypeSubstitution(typeof (InterceptedType.SubbedType),
                    () => new InterceptedType.SubbedType {Val = "Hi"})
            });
            _fakeDriver.Setup(x => x.NavigationHandlers).Returns(new List<DriverBindings.IHandle>
            {
                new DriverBindings.Handle<IdAttribute>((s, d) => "an id string"),
                new DriverBindings.Handle<LinkTextAttribute>((s, d) => "a text string")
            });

            var cfg = new PassengerConfiguration { Driver = _fakeDriver.Object };
            _proxy = ProxyGenerator.Generate<InterceptedType>(cfg);
        }