public void ControllerHasAreaAuthorizeAttributeWithCorrectPolicy()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributes().OfType<AuthorizeAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
     Assert.Equal(attribute.Policy, "OrgAdmin");
 }
 public void ControllerHasAreaAuthorizeAttributeWithCorrectPolicy()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var attribute = sut.GetAttributes().OfType<AuthorizeAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
     Assert.Equal(attribute.Policy, "OrgAdmin");
 }
 public void ControllerHasAreaAtttributeWithTheCorrectAreaName()
 {
     var sut = new ItineraryController(null, null);
     var attribute = sut.GetAttributes().OfType<AreaAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
     Assert.Equal(attribute.RouteValue, "Admin");
 }
 public void ControllerHasAreaAtttributeWithTheCorrectAreaName()
 {
     var sut = new ItineraryController(Mock.Of<IMediator>(), MockSuccessValidation().Object);
     var attribute = sut.GetAttributes().OfType<AreaAttribute>().SingleOrDefault();
     Assert.NotNull(attribute);
     Assert.Equal(attribute.RouteValue, "Admin");
 }