Package org.jboss.test.security.sunxacml.conformance.support

Examples of org.jboss.test.security.sunxacml.conformance.support.TestPDP


      }
   }
  
   public void testMandatoryConformance_Schema_1_through_3() throws Exception
   {
      TestPDP pdp = null;
      for(int i =1; i<=3; i++)
      {
         System.out.println("Checking Schema_conformance:" + i);
         
         String fileName = null;
         if(i < 10)
            fileName = mandatoryBase + "IIE00" + i + "Policy.xml";
        
         String[] policies = new String[] {fileName};
         pdp = new TestPDP(policies);  
         pdp.addPolicyFinderModule(createTestPolicyFinderModule(i));
         pdp.createInternalPDP();
        
         String requestFile = null;
         if(i < 10)
            requestFile = mandatoryBase + "IIE00" + i + "Request.xml";
         ResponseCtx actualResponse = pdp.evaluate(requestFile);
         assertNotNull("Response for" + i,actualResponse);
        
         String responseFile = null;
         if(i < 10)
            responseFile = mandatoryBase + "IIE00" + i + "Response.xml";
View Full Code Here


{
   String mandatoryBase = "src/test/resources/conformance/mandatory/";
  
   public void testMandatoryConformance_AttributeReferences_01_through_21() throws Exception
  
      TestPDP pdp = null;
      for(int i =1; i<=21; i++)
      {
         System.out.println("Checking AttributeReferences_conformance:" + i);
        
         if(i == 4 || i == 5 || i == 12) //policy or request has an error
         {
            System.out.println("Ignoring AttributeReferences_conformance:" + i);
            continue;
         }
        
         String fileName = null;
        
         if(i < 10)
            fileName = mandatoryBase + "IIA00" + i + "Policy.xml";
         else
            fileName = mandatoryBase + "IIA0" + i + "Policy.xml";
         String[] policies = new String[] {fileName};
         pdp = new TestPDP(policies)
        
         if(i == 2)
            pdp.addAttributeFinderModule(new TestAttributeFinderModule());
        
         pdp.createInternalPDP();
        
        
         String requestFile = null;
         if(i < 10)
            requestFile = mandatoryBase + "IIA00" + i + "Request.xml";
         else
            requestFile = mandatoryBase + "IIA0" + i + "Request.xml";
         ResponseCtx actualResponse = pdp.evaluate(requestFile);
         assertNotNull("Response for" + i,actualResponse);
        
         String responseFile = null;
         if(i < 10)
            responseFile = mandatoryBase + "IIA00" + i + "Response.xml";
View Full Code Here

      }
   }
  
   public void testMandatoryConformance_TargetMatching_1_through_53() throws Exception
   {
      TestPDP pdp = null;
      for(int i =1; i<=53; i++)
      {
         System.out.println("Checking TargetMatching_conformance:" + i);
         String fileName = null;
         if(i < 10)
            fileName = mandatoryBase + "IIB00" + i + "Policy.xml";
         else
            fileName = mandatoryBase + "IIB0" + i + "Policy.xml";
        
         String[] policies = new String[] {fileName};
         pdp = new TestPDP(policies)
         pdp.createInternalPDP();
        
         String requestFile = null;
         if(i < 10)
            requestFile = mandatoryBase + "IIB00" + i + "Request.xml";
         else
            requestFile = mandatoryBase + "IIB0" + i + "Request.xml";
         ResponseCtx actualResponse = pdp.evaluate(requestFile);
         assertNotNull("Response for" + i,actualResponse);
        
         String responseFile = null;
         if(i < 10)
            responseFile = mandatoryBase + "IIB00" + i + "Response.xml";
View Full Code Here

      }
   }
  
   public void testMandatoryConformance_FunctionEvaluation_1_through_232() throws Exception
   {
      TestPDP pdp = null;
      for(int i =1; i<=232; i++)
      {
         System.out.println("Checking FunctionEvaluation_conformance:" + i);
         if(i == 3 || i == 14 || i == 12) //Policy/request errors
         {
            System.out.println("Ignoring FunctionEvaluation_conformance:" + i);
            continue;
         }
        
         if(i == 23 || i == 54 || i == 55 || i == 88 || i == 89 ||
               i == 92 || i == 93 || i == 98 || i == 99) //Test is not present
            continue;
        
         String fileName = null;
        
         if(i < 10)
            fileName = mandatoryBase + "IIC00" + i + "Policy.xml";
         else if( i < 100)
            fileName = mandatoryBase + "IIC0" + i + "Policy.xml";
         else
            fileName = mandatoryBase + "IIC" + i + "Policy.xml";
        
         String[] policies = new String[] {fileName};
         pdp = new TestPDP(policies)
         pdp.createInternalPDP();
        
        
         String requestFile = null;
         if(i < 10)
            requestFile = mandatoryBase + "IIC00" + i + "Request.xml";
         else if(i < 100)
            requestFile = mandatoryBase + "IIC0" + i + "Request.xml";
         else
            requestFile = mandatoryBase + "IIC" + i + "Request.xml";
        
         ResponseCtx actualResponse = pdp.evaluate(requestFile);
         assertNotNull("Response for" + i,actualResponse);
        
         String responseFile = null;
         if(i < 10)
            responseFile = mandatoryBase + "IIC00" + i + "Response.xml";
View Full Code Here

      }
   }
  
   public void testMandatoryConformance_CombiningAlgorithms_1_through_30() throws Exception
   {
      TestPDP pdp = null;
      for(int i =1; i<=30; i++)
      {
         System.out.println("Checking CombiningAlgorithms_conformance:" + i);
        
         if(i == 29 || i == 30)
         {
            System.out.println("Ignoring CombiningAlgorithms_conformance:" + i);
            continue;
         }
         String fileName = null;
         if(i < 10)
            fileName = mandatoryBase + "IID00" + i + "Policy.xml";
         else
            fileName = mandatoryBase + "IID0" + i + "Policy.xml";
        
         String[] policies = new String[] {fileName};
         pdp = new TestPDP(policies)
         pdp.createInternalPDP();
        
         String requestFile = null;
         if(i < 10)
            requestFile = mandatoryBase + "IID00" + i + "Request.xml";
         else
            requestFile = mandatoryBase + "IID0" + i + "Request.xml";
         ResponseCtx actualResponse = pdp.evaluate(requestFile);
         assertNotNull("Response for" + i,actualResponse);
        
         String responseFile = null;
         if(i < 10)
            responseFile = mandatoryBase + "IID00" + i + "Response.xml";
View Full Code Here

TOP

Related Classes of org.jboss.test.security.sunxacml.conformance.support.TestPDP

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.