csharp-sdk-upm/Realtime/Realtime.Test/Utils.cs

26 lines
822 B
C#
Raw Normal View History

using System;
using LeanCloud;
using LeanCloud.Common;
using NUnit.Framework;
namespace Realtime.Test {
public static class Utils {
internal static void Print(LCLogLevel level, string info) {
switch (level) {
case LCLogLevel.Debug:
2020-06-23 15:25:30 +08:00
TestContext.Out.WriteLine($"[DEBUG] {DateTime.Now} {info}\n");
break;
case LCLogLevel.Warn:
2020-06-23 15:25:30 +08:00
TestContext.Out.WriteLine($"[WARNING] {DateTime.Now} {info}\n");
break;
case LCLogLevel.Error:
2020-06-23 15:25:30 +08:00
TestContext.Out.WriteLine($"[ERROR] {DateTime.Now} {info}\n");
break;
default:
TestContext.Out.WriteLine(info);
break;
}
}
}
}