Package io.airlift.testing.EquivalenceTester

Examples of io.airlift.testing.EquivalenceTester.ElementCheckFailure


    @Test
    public void testCheckFailure()
    {
        Object o1 = new Object();
        Object o2 = new Object();
        assertEquals(new ElementCheckFailure(EQUAL, 0, 0, o1), new ElementCheckFailure(EQUAL, 0, 0, o1));
        assertEquals(new PairCheckFailure(EQUAL, 0, 0, o1, 1, 0, o2), new PairCheckFailure(EQUAL, 0, 0, o1, 1, 0, o2));
    }
View Full Code Here


                    .addEquivalentGroup(notReflexive)
                    .check();
            fail("Expected EquivalenceAssertionError");
        }
        catch (EquivalenceAssertionError e) {
            assertExpectedFailures(e, new ElementCheckFailure(NOT_REFLEXIVE, 0, 0, notReflexive));
        }
    }
View Full Code Here

                    .addEquivalentGroup(comparableNotReflexive)
                    .check();
            fail("Expected EquivalenceAssertionError");
        }
        catch (EquivalenceAssertionError e) {
            assertExpectedFailures(e, new ElementCheckFailure(COMPARE_NOT_REFLEXIVE, 0, 0, comparableNotReflexive));
        }
    }
View Full Code Here

                    .addEquivalentGroup(equalsNull)
                    .check();
            fail("Expected EquivalenceAssertionError");
        }
        catch (EquivalenceAssertionError e) {
            assertExpectedFailures(e, new ElementCheckFailure(EQUAL_TO_NULL, 0, 0, equalsNull));
        }
    }
View Full Code Here

                    .addEquivalentGroup(equalsNullThrowsException)
                    .check();
            fail("Expected EquivalenceAssertionError");
        }
        catch (EquivalenceAssertionError e) {
            assertExpectedFailures(e, new ElementCheckFailure(EQUAL_NULL_EXCEPTION, 0, 0, equalsNullThrowsException));
        }
    }
View Full Code Here

                    .addEquivalentGroup(equalsUnrelatedClass)
                    .check();
            fail("Expected EquivalenceAssertionError");
        }
        catch (EquivalenceAssertionError e) {
            assertExpectedFailures(e, new ElementCheckFailure(EQUAL_TO_UNRELATED_CLASS, 0, 0, equalsUnrelatedClass));
        }
    }
View Full Code Here

                    .addEquivalentGroup(equalsOtherClassThrowsException)
                    .check();
            fail("Expected EquivalenceAssertionError");
        }
        catch (EquivalenceAssertionError e) {
            assertExpectedFailures(e, new ElementCheckFailure(EQUAL_TO_UNRELATED_CLASS_CLASS_CAST_EXCEPTION, 0, 0, equalsOtherClassThrowsException));
        }
    }
View Full Code Here

                    .check();
            fail("Expected EquivalenceAssertionError");
        }
        catch (EquivalenceAssertionError e) {
            assertExpectedFailures(e,
                    new ElementCheckFailure(COMPARE_EQUAL_TO_NULL, 0, 0, comparableThatDoesNotThrowNPE)
            );
        }
    }
View Full Code Here

TOP

Related Classes of io.airlift.testing.EquivalenceTester.ElementCheckFailure

Copyright © 2018 www.massapicom. 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.