chore: 异常测试

oneRain 2020-02-27 15:30:14 +08:00
parent f8798b67e8
commit 2e026c2b76
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
using NUnit.Framework;
using LeanCloud.Storage;
namespace LeanCloud.Test {
public class ExceptionTest {
[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);
}
}
}
}