From 53bfd3af081a38bb9087cf147a7e28f9f2cebad6 Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Wed, 16 Jan 2019 14:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0MessagesController=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UnitTest/Bootstrap.Admin/Api/MessagesTest.cs | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 UnitTest/Bootstrap.Admin/Api/MessagesTest.cs diff --git a/UnitTest/Bootstrap.Admin/Api/MessagesTest.cs b/UnitTest/Bootstrap.Admin/Api/MessagesTest.cs new file mode 100644 index 00000000..028533a8 --- /dev/null +++ b/UnitTest/Bootstrap.Admin/Api/MessagesTest.cs @@ -0,0 +1,33 @@ +using Bootstrap.Admin.Models; +using Bootstrap.DataAccess; +using System.Collections.Generic; +using Xunit; + +namespace Bootstrap.Admin.Api +{ + public class MessagesTest : ApiTest + { + public MessagesTest(BAWebHost factory) : base(factory, "Messages", true) + { + + } + + [Theory] + [InlineData("inbox")] + [InlineData("sendmail")] + [InlineData("mark")] + [InlineData("trash")] + public async void Get_Ok(string action) + { + var resp = await Client.GetAsJsonAsync>(action); + Assert.NotNull(resp); + } + + [Fact] + public async void GetCount_Ok() + { + var resp = await Client.GetAsJsonAsync(string.Empty); + Assert.NotNull(resp); + } + } +}