public void ControllerHasAreaAuthorizeAttribute_WithCorrectPolicy() { var sut = new RequestController(null); var attribute = sut.GetAttributes().OfType<AuthorizeAttribute>().SingleOrDefault(); Assert.NotNull(attribute); Assert.Equal(attribute.Policy, "OrgAdmin"); }
public void ControllerHasRouteAttribute_WithCorrectTemplate() { var sut = new RequestController(null); var attribute = sut.GetAttributes().OfType<RouteAttribute>().SingleOrDefault(); Assert.NotNull(attribute); Assert.Equal(attribute.Template, "Admin/Requests"); }
public void ControllerHasAreaAtttribute_WithTheCorrectAreaName() { var sut = new RequestController(null); var attribute = sut.GetAttributes().OfType<AreaAttribute>().SingleOrDefault(); Assert.NotNull(attribute); Assert.Equal(attribute.RouteValue, "Admin"); }