Exemplo n.º 1
0
 @Test
 public void tesNottEquals() {
   Metric m1 = new Metric();
   Metric m2 = new Metric();
   m1.setFrom("from1");
   m2.setFrom("from2");
   assertFalse(m1.equals(m2));
 }
Exemplo n.º 2
0
  @Test
  public void testEqualsFilledOut() {
    Metric m1 = new Metric();
    m1.setFrom("from");
    m1.setHost("host");
    m1.setInstance("instance");
    m1.setProcess("proc");
    m1.setResource("resource");
    m1.setSource("source");
    m1.setTimestamp("time");
    m1.setValues(new HashMap<String, Double>());

    Metric m2 = new Metric();
    m2.setFrom("from");
    m2.setHost("host");
    m2.setInstance("instance");
    m2.setProcess("proc");
    m2.setResource("resource");
    m2.setSource("source");
    m2.setTimestamp("time");
    m2.setValues(new HashMap<String, Double>());

    assertEquals(m1, m2);
  }