Example #1
0
        public void CurrentUptime_ShouldReturnValidUptimeString()
        {
            TimeSpan span = new TimeSpan(2, 1, 5);

            string expect = $" {span.Hours} Hours {span.Minutes} Minute {span.Seconds} Seconds";

            string actual = GeneralModule.CurrentUptime(span);

            Assert.Equal(expect, actual);
        }
Example #2
0
 public async Task CalculateUptime()
 {
     TimeSpan uptime = DateTime.Now - Program.StartTime;
     await Context.Message.Channel.SendMessageAsync($"My current uptime is {GeneralModule.CurrentUptime(uptime)}. I'm online since {Program.StartTime} .");
 }