protected void AssertIsInRange(long val, long lowerLimit, long upperLimit, IGrain grain, string reminderName, TimeSpan sleepFor) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("Grain: {0} Grain PrimaryKey: {1}, Reminder: {2}, SleepFor: {3} Time now: {4}", grain.ToString(), grain.GetPrimaryKey(), reminderName, sleepFor, Time()); sb.AppendFormat( " -- Expecting value in the range between {0} and {1}, and got value {2}.", lowerLimit, upperLimit, val); logger.Info(sb.ToString()); bool tickCountIsInsideRange = lowerLimit <= val && val <= upperLimit; Skip.IfNot(tickCountIsInsideRange, string.Format("AssertIsInRange: {0} -- WHICH IS OUTSIDE RANGE.", sb)); }