From 2e026c2b76d10e0cf8ff719c989e7dd82ae7fc01 Mon Sep 17 00:00:00 2001 From: oneRain Date: Thu, 27 Feb 2020 15:30:14 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=BC=82=E5=B8=B8=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Storage/Storage.Test/ExceptionTest.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Storage/Storage.Test/ExceptionTest.cs diff --git a/Storage/Storage.Test/ExceptionTest.cs b/Storage/Storage.Test/ExceptionTest.cs new file mode 100644 index 0000000..4097e6f --- /dev/null +++ b/Storage/Storage.Test/ExceptionTest.cs @@ -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); + } + } + } +}