csharp-sdk-upm/Storage/Storage.Test/ExceptionTest.cs

17 lines
431 B
C#
Raw Normal View History

2020-02-27 15:30:14 +08:00
using NUnit.Framework;
using LeanCloud;
2020-02-27 15:30:14 +08:00
2020-04-28 17:04:46 +08:00
namespace Storage.Test {
2021-04-29 15:58:22 +08:00
public class ExceptionTest : BaseTest {
2020-02-27 15:30:14 +08:00
[Test]
public void LeanCloudException() {
try {
throw new LCException(123, "hello, world");
} catch (LCException e) {
TestContext.WriteLine($"{e.Code} : {e.Message}");
Assert.AreEqual(e.Code, 123);
}
}
}
}