Package ru.yandex.qatools.htmlelements

Source Code of ru.yandex.qatools.htmlelements.AnnotatedBySuperclassElementsInitializationTest

package ru.yandex.qatools.htmlelements;

import org.junit.Test;
import org.openqa.selenium.WebDriver;
import ru.yandex.qatools.htmlelements.loader.HtmlElementLoader;
import ru.yandex.qatools.htmlelements.testelements.NotAnnotatedExtendedSearchArrow;
import ru.yandex.qatools.htmlelements.testpages.AnnotatedBySuperclassElementsPage;

import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;

/**
* @author Alexander Tolmachev starlight@yandex-team.ru
*         Date: 26.02.13
*/
public class AnnotatedBySuperclassElementsInitializationTest {
    private final WebDriver driver = AnnotatedBySuperclassElementsPage.mockDriver();

    @Test
    public void createdAnnotatedBySuperclassHtmlElementShouldBeInitialized() {
        NotAnnotatedExtendedSearchArrow searchArrow = HtmlElementLoader.create(NotAnnotatedExtendedSearchArrow.class, driver);

        assertThat(searchArrow.getWrappedElement(), is(notNullValue()));
    }

    @Test
    public void populatedAnnotatedBySuperclassHtmlElementShouldBeInitialized() {
        NotAnnotatedExtendedSearchArrow searchArrow = new NotAnnotatedExtendedSearchArrow();
        HtmlElementLoader.populate(searchArrow, driver);

        assertThat(searchArrow.getWrappedElement(), is(notNullValue()));
    }

    @Test
    public void annotatedBySuperclassElementsPageShouldBeInitialized() {
        AnnotatedBySuperclassElementsPage page = new AnnotatedBySuperclassElementsPage(driver);

        assertThat("Htmlelement annotated by superclass should be not null",
                page.getSearchArrow(), is(notNullValue()));
        assertThat("List annotated by parameter superclass  should be not null",
                page.getCompanyList(), is(notNullValue()));
    }
}
TOP

Related Classes of ru.yandex.qatools.htmlelements.AnnotatedBySuperclassElementsInitializationTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.