示例#1
0
 @Test
 public void testToString() {
   Metric m = new Metric();
   String value = m.toString();
   assertNotNull(value);
   assertFalse(value.isEmpty());
 }
示例#2
0
 @Test
 public void tesNottEquals() {
   Metric m1 = new Metric();
   Metric m2 = new Metric();
   m1.setFrom("from1");
   m2.setFrom("from2");
   assertFalse(m1.equals(m2));
 }
示例#3
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);
  }
示例#4
0
 @Test
 public void testEquals() {
   Metric m1 = new Metric();
   Object o = new Object();
   assertFalse(m1.equals(o));
 }