public void OnCompletion_Triggered_If_Has_Result()
        {
            var timer = GetMonitor(true);

            PerformanceBudgetResult result = null;

            var budget = new PerformanceBudget(timer, 1.0M, (r) => result = r);
            budget.Dispose();

            Assert.NotNull(result);
        }
 public void Dispose_Does_Not_Throw_If_OnCompletion_Null()
 {
     var timer = GetMonitor(true);
     var budget = new PerformanceBudget(timer, 1.0M, null);
     budget.Dispose();
 }
 public void Dispose_Does_Not_Throw_If_Monitor_Is_Null()
 {
     var budget = new PerformanceBudget(null, 1.0M, (r) => { });
     budget.Dispose();
 }