当前位置: 首页>>代码示例>>Java>>正文


Java Matchers.allOf方法代码示例

本文整理汇总了Java中org.hamcrest.Matchers.allOf方法的典型用法代码示例。如果您正苦于以下问题:Java Matchers.allOf方法的具体用法?Java Matchers.allOf怎么用?Java Matchers.allOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hamcrest.Matchers的用法示例。


在下文中一共展示了Matchers.allOf方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: textView_returnsProperMatcher

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void textView_returnsProperMatcher() {
    //given
    final Cortado.OrAnd.Matcher matcher = Cortado.textView().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(TextView.class),
            matcher.getCortado().matchers.get(0));

    //when

    //then
    Utils.assertThat(matcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:14,代码来源:Cortado_Tests.java

示例2: editText_returnsProperMatcher

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void editText_returnsProperMatcher() {
    //given
    final Cortado.OrAnd.Matcher matcher = Cortado.editText().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(EditText.class),
            matcher.getCortado().matchers.get(0));

    //when

    //then
    Utils.assertThat(matcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:14,代码来源:Cortado_Tests.java

示例3: button_returnsProperMatcher

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void button_returnsProperMatcher() {
    //given
    final Cortado.OrAnd.Matcher matcher = Cortado.button().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(Button.class),
            matcher.getCortado().matchers.get(0));

    //when

    //then
    Utils.assertThat(matcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:14,代码来源:Cortado_Tests.java

示例4: imageView_returnsProperMatcher

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void imageView_returnsProperMatcher() {
    //given
    final Cortado.OrAnd.Matcher matcher = Cortado.imageView().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(ImageView.class),
            matcher.getCortado().matchers.get(0));

    //when

    //then
    Utils.assertThat(matcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:14,代码来源:Cortado_Tests.java

示例5: imageButton_returnsProperMatcher

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void imageButton_returnsProperMatcher() {
    //given
    final Cortado.OrAnd.Matcher matcher = Cortado.imageButton().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(ImageButton.class),
            matcher.getCortado().matchers.get(0));

    //when

    //then
    Utils.assertThat(matcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:14,代码来源:Cortado_Tests.java

示例6: onTextView_returnsProperViewInteraction

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void onTextView_returnsProperViewInteraction() {
    //given
    final Cortado.OrAnd.ViewInteraction viewInteraction = Cortado.onTextView().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(TextView.class),
            viewInteraction.getCortado().matchers.get(0));

    //when
    final Matcher<View> rawMatcher = viewInteraction.getCortado().get();

    //then
    Utils.assertThat(rawMatcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:15,代码来源:Cortado_Tests.java

示例7: onEditText_returnsProperViewInteraction

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void onEditText_returnsProperViewInteraction() {
    //given
    final Cortado.OrAnd.ViewInteraction viewInteraction = Cortado.onEditText().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(EditText.class),
            viewInteraction.getCortado().matchers.get(0));

    //when
    final Matcher<View> rawMatcher = viewInteraction.getCortado().get();

    //then
    Utils.assertThat(rawMatcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:15,代码来源:Cortado_Tests.java

示例8: onButton_returnsProperViewInteraction

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void onButton_returnsProperViewInteraction() {
    //given
    final Cortado.OrAnd.ViewInteraction viewInteraction = Cortado.onButton().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(Button.class),
            viewInteraction.getCortado().matchers.get(0));

    //when
    final Matcher<View> rawMatcher = viewInteraction.getCortado().get();

    //then
    Utils.assertThat(rawMatcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:15,代码来源:Cortado_Tests.java

示例9: onImageView_returnsProperViewInteraction

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void onImageView_returnsProperViewInteraction() {
    //given
    final Cortado.OrAnd.ViewInteraction viewInteraction = Cortado.onImageView().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(ImageView.class),
            viewInteraction.getCortado().matchers.get(0));

    //when
    final Matcher<View> rawMatcher = viewInteraction.getCortado().get();

    //then
    Utils.assertThat(rawMatcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:15,代码来源:Cortado_Tests.java

示例10: onImageButton_returnsProperViewInteraction

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Test
public void onImageButton_returnsProperViewInteraction() {
    //given
    final Cortado.OrAnd.ViewInteraction viewInteraction = Cortado.onImageButton().withText("test");
    final Matcher<View> expectedEspressoMatcher = Matchers.allOf(
            ViewMatchers.isAssignableFrom(ImageButton.class),
            viewInteraction.getCortado().matchers.get(0));

    //when
    final Matcher<View> rawMatcher = viewInteraction.getCortado().get();

    //then
    Utils.assertThat(rawMatcher).isEqualTo(expectedEspressoMatcher);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:15,代码来源:Cortado_Tests.java

示例11: getConstraints

import org.hamcrest.Matchers; //导入方法依赖的package包/类
public Matcher<View> getConstraints() {
    return Matchers.allOf(new Matcher[] {
            ViewMatchers.isAssignableFrom(RecyclerView.class), ViewMatchers.isDisplayed()
    });
}
 
开发者ID:graviton57,项目名称:DOUSalaries,代码行数:6,代码来源:TestUtils.java

示例12: link

import org.hamcrest.Matchers; //导入方法依赖的package包/类
@Override
Matcher<? super View> link(List<Matcher<? super View>> matchers) {
    return Matchers.allOf(matchers);
}
 
开发者ID:blipinsk,项目名称:cortado,代码行数:5,代码来源:Linker.java


注:本文中的org.hamcrest.Matchers.allOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。