Esempio n. 1
0
        public void SetUpMocks()
        {
            _factoryMock   = new Mock <AbstractPageObjectFactory>(MockBehavior.Loose);
            _searchContext = new Mock <IWebDriver>(MockBehavior.Loose).Object;
            _factory       = _factoryMock.Object;

            _factoryMock.Protected()
            .Setup <object>("CreatePageObjectInstance", typeof(PageObjectA), _searchContext)
            .Returns(new PageObjectA(_searchContext));
        }
        public void SetUpMocks()
        {
            _factoryMock = new Mock<AbstractPageObjectFactory>(MockBehavior.Loose);
            _searchContext = new Mock<IWebDriver>(MockBehavior.Loose).Object;
            _factory = _factoryMock.Object;

            _factoryMock.Protected()
                .Setup<Object>("CreatePageObjectInstance", typeof(PageObjectA), _searchContext)
                .Returns(new PageObjectA(_searchContext));
        }