public void ControllerHasAuthorizeAtttributeWithCorrectPolicy()
        {
            var sut       = new OrganizationApiController(null);
            var attribute = sut.GetAttributes().OfType <AuthorizeAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
            Assert.Equal(attribute.Policy, "OrgAdmin");
        }
        public void ControllerHasProducesAtttributeWithTheCorrectContentType()
        {
            var sut       = new OrganizationApiController(null);
            var attribute = sut.GetAttributes().OfType <ProducesAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
            Assert.Equal(attribute.ContentTypes.Select(x => x).First(), "application/json");
        }
        public void ControllerHasAreaAtttributeWithTheCorrectAreaName()
        {
            var sut       = new OrganizationApiController(null);
            var attribute = sut.GetAttributes().OfType <AreaAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
            Assert.Equal(attribute.RouteValue, AreaNames.Admin);
        }
        public void ControllerHasRouteAtttributeWithTheCorrectRoute()
        {
            var sut       = new OrganizationApiController(null);
            var attribute = sut.GetAttributes().OfType <RouteAttribute>().SingleOrDefault();

            Assert.NotNull(attribute);
            Assert.Equal(attribute.Template, "admin/api/organization");
        }