From d131d984a282f5b8327921c4361c74805353b52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 25 Feb 2018 13:26:30 +0300 Subject: [PATCH] Added unit test for anonymous in authorization. --- .../Volo/Abp/Authorization/Authorization_Tests.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs b/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs index 9e30bfca50..dbd42f17ca 100644 --- a/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs +++ b/test/Volo.Abp.Authorization.Tests/Volo/Abp/Authorization/Authorization_Tests.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using Shouldly; using Volo.Abp.Authorization.TestServices; using Xunit; @@ -30,5 +31,17 @@ namespace Volo.Abp.Authorization await _myAuthorizedService1.ProtectedByClassAsync(); }); } + + [Fact] + public void Should_Allow_To_Call_Anonymous_Method() + { + _myAuthorizedService1.Anonymous().ShouldBe(42); + } + + [Fact] + public async Task Should_Allow_To_Call_Anonymous_Method_Async() + { + (await _myAuthorizedService1.AnonymousAsync()).ShouldBe(42); + } } } \ No newline at end of file