Esempio n. 1
0
 @Test
 public void annotatedMethodValues() {
   TestClass tc = new TestClass(MethodsAnnotated.class);
   List<String> values =
       tc.getAnnotatedMethodValues(new MethodsAnnotated(), Ignore.class, String.class);
   assertThat(values, hasItem("jupiter"));
   assertThat(values.size(), is(1));
 }
Esempio n. 2
0
 /**
  * @return the {@code ClassRule}s that can transform the block that runs each method in the tested
  *     class.
  */
 protected List<TestRule> classRules() {
   List<TestRule> result =
       fTestClass.getAnnotatedMethodValues(null, ClassRule.class, TestRule.class);
   result.addAll(fTestClass.getAnnotatedFieldValues(null, ClassRule.class, TestRule.class));
   return result;
 }