Package com.dianping.cat.status

Source Code of com.dianping.cat.status.StatusInfoCollectorTest

package com.dianping.cat.status;

import junit.framework.Assert;

import org.junit.Test;

import com.dianping.cat.status.model.entity.StatusInfo;

public class StatusInfoCollectorTest {
  @Test
  public void test() {
    StatusInfo status = new StatusInfo();

    status.accept(new StatusInfoCollector(null, null));

    Assert.assertEquals(true, status.getDisk() != null);
    Assert.assertEquals(true, status.getMemory() != null);
    Assert.assertEquals(true, status.getMessage().getBytes() >= 0);
    Assert.assertEquals(true, status.getMessage().getOverflowed() >= 0);
    Assert.assertEquals(true, status.getMessage().getProduced() >= 0);
    Assert.assertEquals(true, status.getOs() != null);
    Assert.assertEquals(true, status.getRuntime() != null);
    Assert.assertEquals(true, status.getThread() != null);
  }
}
TOP

Related Classes of com.dianping.cat.status.StatusInfoCollectorTest

TOP
Copyright © 2018 www.massapi.com. 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.