コード例 #1
0
  @Test
  public void testTimestampDiffersLhsNull() throws Exception {
    Zentity lhs = new Zentity();
    Zentity rhs = new Zentity();

    lhs.setSqlTimestamp(null);
    rhs.setSqlTimestamp(new Timestamp(123123124L));

    assertTrue(comparator.isDifferent(lhs, rhs));
  }
コード例 #2
0
  @Test
  public void testBoxedIntegerDiffers() throws Exception {
    Zentity lhs = new Zentity();
    Zentity rhs = new Zentity();

    lhs.setBoxedInt(1234);
    rhs.setBoxedInt(4321);

    assertTrue(comparator.isDifferent(lhs, rhs));
  }
コード例 #3
0
  @Test
  public void testBoxedIntegerDiffersRhsNull() throws Exception {
    Zentity lhs = new Zentity();
    Zentity rhs = new Zentity();

    lhs.setBoxedInt(4433);
    rhs.setBoxedInt(null);

    assertTrue(comparator.isDifferent(lhs, rhs));
  }
コード例 #4
0
  @Test
  public void testPrimitiveBooleanDiffers() throws Exception {
    Zentity lhs = new Zentity();
    Zentity rhs = new Zentity();

    lhs.setPrimitiveBool(true);
    rhs.setPrimitiveBool(false);

    assertTrue(comparator.isDifferent(lhs, rhs));
  }