Ejemplo n.º 1
0
        public void Start_NoIntervals_NoText_Failed()
        {
            var heartbeat = new hb.Heartbeat(this);

            heartbeat.Start();
            heartbeat.SetFailed();
        }
Ejemplo n.º 2
0
        public void RunCount_Failure()
        {
            long countInterval = 5000;
            long countTo       = RandomValueGenerator.GetRandomInt(1000, 50000);
            var  heartbeat     = new hb.Heartbeat(this, countInterval, 0);

            heartbeat.Start("RunCount_NoHandler, countInterval: {0}, countTo: {1}".FormatWith(countInterval, countTo));
            try
            {
                for (int i = 0; i < countTo; i++)
                {
                    heartbeat.IncrementCount();
                }
                var zero = 0;
                var dbz  = 1 / zero;
                heartbeat.SetComplete("RunCount_NoHandler finished");
            }
            catch (Exception ex)
            {
                heartbeat.SetFailed("RunCount_NoHandler failed, message: {0}".FormatWith(ex.FullMessage()));
            }
        }
Ejemplo n.º 3
0
     public void RunCount_Failure()
     {
         long countInterval = 5000;
         long countTo = RandomValueGenerator.GetRandomInt(1000, 50000);
 var heartbeat = new hb.Heartbeat(this, countInterval, 0);
 heartbeat.Start("RunCount_NoHandler, countInterval: {0}, countTo: {1}".FormatWith(countInterval, countTo));
 try
 {
     for (int i = 0; i < countTo; i++)
     {
         heartbeat.IncrementCount();
     }
     var zero = 0;
     var dbz = 1 / zero;
     heartbeat.SetComplete("RunCount_NoHandler finished");
 }
 catch (Exception ex)
 {
     heartbeat.SetFailed("RunCount_NoHandler failed, message: {0}".FormatWith(ex.FullMessage()));
 }
     }
Ejemplo n.º 4
0
 public void Start_NoIntervals_NoText_Failed()
 {
     var heartbeat = new hb.Heartbeat(this);
     heartbeat.Start();
     heartbeat.SetFailed();
 }