Last active
December 1, 2021 15:24
-
-
Save RyanSusana/e1d158536a85411b9e37e402168e1fee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void ServicesShouldBeAuthorized() | |
{ | |
var services = Classes().That() | |
.DependOnAny(typeof(ServerCallContext)) | |
.And().AreNotAbstract() | |
.As("Services"); | |
var rule = services | |
.Should() | |
.HaveAnyAttributesThat() | |
.Are(typeof(AuthorizeAttribute)); | |
// _architecture is loaded in on test startup | |
rule.AssertValid(_architecture); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment