Java 类org.junit.experimental.theories.internal.ParameterizedAssertionError 实例源码

项目:sosiefier    文件:Theories.java   
protected void reportParameterizedError(Throwable e, Object... params)
        throws Throwable {
    if (params.length == 0) {
        throw e;
    }
    throw new ParameterizedAssertionError(e, fTestMethod.getName(),
            params);
}
项目:sosiefier    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void equalsReturnsTrue(Throwable targetException, String methodName,
        Object[] params) {
    assertThat(new ParameterizedAssertionError(targetException, methodName,
            params), is(new ParameterizedAssertionError(targetException,
            methodName, params)));
}
项目:sosiefier    文件:ParameterizedAssertionErrorTest.java   
@Test
public void canJoinWhenToStringFails() {
    assertThat(ParameterizedAssertionError.join(" ", new Object() {
        @Override
        public String toString() {
            throw new UnsupportedOperationException();
        }
    }), is("[toString failed]"));
}
项目:lcm    文件:Theories.java   
protected void reportParameterizedError(Throwable e, Object... params)
        throws Throwable {
    if (params.length == 0) {
        throw e;
    }
    throw new ParameterizedAssertionError(e, fTestMethod.getName(),
            params);
}
项目:junit    文件:Theories.java   
protected void reportParameterizedError(Throwable e, Object... params)
        throws Throwable {
    if (params.length == 0) {
        throw e;
    }
    throw new ParameterizedAssertionError(e, fTestMethod.getName(),
            params);
}
项目:junit    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void equalsReturnsTrue(Throwable targetException, String methodName,
        Object[] params) {
    assertThat(new ParameterizedAssertionError(targetException, methodName,
            params), is(new ParameterizedAssertionError(targetException,
            methodName, params)));
}
项目:junit    文件:ParameterizedAssertionErrorTest.java   
@Test
public void canJoinWhenToStringFails() {
    assertThat(ParameterizedAssertionError.join(" ", new Object() {
        @Override
        public String toString() {
            throw new UnsupportedOperationException();
        }
    }), is("[toString failed]"));
}
项目:org.openntf.domino    文件:Theories.java   
protected void reportParameterizedError(Throwable e, Object... params)
        throws Throwable {
    if (params.length == 0) {
        throw e;
    }
    throw new ParameterizedAssertionError(e, fTestMethod.getName(),
            params);
}
项目:health-and-care-developer-network    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void equalsReturnsTrue(Throwable targetException, String methodName,
        Object[] params) {
    assertThat(new ParameterizedAssertionError(targetException, methodName,
            params), is(new ParameterizedAssertionError(targetException,
            methodName, params)));
}
项目:health-and-care-developer-network    文件:ParameterizedAssertionErrorTest.java   
@Test
public void canJoinWhenToStringFails() {
    assertThat(ParameterizedAssertionError.join(" ", new Object() {
        @Override
        public String toString() {
            throw new UnsupportedOperationException();
        }
    }), is("[toString failed]"));
}
项目:sosiefier    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void equalParameterizedAssertionErrorsHaveSameToString(
        ParameterizedAssertionError a, ParameterizedAssertionError b) {
    assumeThat(a, is(b));
    assertThat(a.toString(), is(b.toString()));
}
项目:sosiefier    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void differentParameterizedAssertionErrorsHaveDifferentToStrings(
        ParameterizedAssertionError a, ParameterizedAssertionError b) {
    assumeThat(a, not(b));
    assertThat(a.toString(), not(b.toString()));
}
项目:sosiefier    文件:ParameterizedAssertionErrorTest.java   
@Theory(nullsAccepted = false)
public void buildParameterizedAssertionError(String methodName, String param) {
    assertThat(new ParameterizedAssertionError(new RuntimeException(),
            methodName, param).toString(), containsString(methodName));
}
项目:sosiefier    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void isNotEqualToNull(ParameterizedAssertionError a) {
    assertFalse(a.equals(null));
}
项目:junit    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void equalParameterizedAssertionErrorsHaveSameToString(
        ParameterizedAssertionError a, ParameterizedAssertionError b) {
    assumeThat(a, is(b));
    assertThat(a.toString(), is(b.toString()));
}
项目:junit    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void differentParameterizedAssertionErrorsHaveDifferentToStrings(
        ParameterizedAssertionError a, ParameterizedAssertionError b) {
    assumeThat(a, not(b));
    assertThat(a.toString(), not(b.toString()));
}
项目:junit    文件:ParameterizedAssertionErrorTest.java   
@Theory(nullsAccepted = false)
public void buildParameterizedAssertionError(String methodName, String param) {
    assertThat(new ParameterizedAssertionError(new RuntimeException(),
            methodName, param).toString(), containsString(methodName));
}
项目:health-and-care-developer-network    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void equalParameterizedAssertionErrorsHaveSameToString(
        ParameterizedAssertionError a, ParameterizedAssertionError b) {
    assumeThat(a, is(b));
    assertThat(a.toString(), is(b.toString()));
}
项目:health-and-care-developer-network    文件:ParameterizedAssertionErrorTest.java   
@Theory
public void differentParameterizedAssertionErrorsHaveDifferentToStrings(
        ParameterizedAssertionError a, ParameterizedAssertionError b) {
    assumeThat(a, not(b));
    assertThat(a.toString(), not(b.toString()));
}
项目:health-and-care-developer-network    文件:ParameterizedAssertionErrorTest.java   
@Theory(nullsAccepted = false)
public void buildParameterizedAssertionError(String methodName, String param) {
    assertThat(new ParameterizedAssertionError(new RuntimeException(),
            methodName, param).toString(), containsString(methodName));
}