コード例 #1
0
ファイル: FeedAclTest.java プロジェクト: nigel-jones/falcon
  @DataProvider(name = "generateUserScheduledEditOpsPermission")
  public Object[][] generateUserScheduledEditOpsPermission() {

    final Object[][] allowedCombinations =
        MatrixUtil.crossProduct(
            new String[] {
              MerlinConstants.FALCON_SUPER_USER_NAME,
              MerlinConstants.FALCON_SUPER_USER2_NAME,
              MerlinConstants.USER2_NAME,
            },
            new EntityOp[] {
              EntityOp.delete, EntityOp.update, EntityOp.suspend, EntityOp.resume,
            },
            new Boolean[] {
              true,
            });

    final Object[][] notAllowedCombinations =
        MatrixUtil.crossProduct(
            new String[] {
              MerlinConstants.DIFFERENT_USER_NAME,
            },
            new EntityOp[] {
              EntityOp.delete, EntityOp.update, EntityOp.suspend, EntityOp.resume,
            },
            new Boolean[] {
              false,
            });

    return MatrixUtil.append(allowedCombinations, notAllowedCombinations);
  }
コード例 #2
0
 @DataProvider
 public Object[][] getMismatchPattern() {
   String[] mismatchPatternParam =
       new String[] {"akm", "ne d", "newss", "new*", "NewEntityDefinitions"};
   AbstractEntityHelper[] helper =
       new AbstractEntityHelper[] {
         prism.getProcessHelper(), prism.getFeedHelper(), prism.getClusterHelper(),
       };
   return MatrixUtil.crossProduct(helper, mismatchPatternParam);
 }
コード例 #3
0
 @DataProvider
 public Object[][] getPattern() {
   String[] patternParam =
       new String[] {
         "new", "defintion", "W-E", "NewEntityDefinition", "ned",
         "NED", "NeD", "N-e-D", "N-e-D123", "",
       };
   AbstractEntityHelper[] helper =
       new AbstractEntityHelper[] {
         prism.getProcessHelper(), prism.getFeedHelper(), prism.getClusterHelper(),
       };
   return MatrixUtil.crossProduct(helper, patternParam);
 }
コード例 #4
0
ファイル: FeedAclTest.java プロジェクト: nigel-jones/falcon
  @DataProvider(name = "generateUserReadOpsPermissions")
  public Object[][] generateUserReadOpsPermissions() {
    final EntityOp[] falconReadOps = {
      EntityOp.status, EntityOp.dependency, EntityOp.listing, EntityOp.definition,
    };
    final Object[][] allowedCombinations =
        MatrixUtil.crossProduct(
            new String[] {
              MerlinConstants.FALCON_SUPER_USER_NAME,
              MerlinConstants.FALCON_SUPER_USER2_NAME,
              MerlinConstants.USER2_NAME,
            },
            falconReadOps,
            new Boolean[] {true});

    final Object[][] notAllowedCombinations =
        MatrixUtil.crossProduct(
            new String[] {MerlinConstants.DIFFERENT_USER_NAME},
            falconReadOps,
            new Boolean[] {false});
    return MatrixUtil.append(allowedCombinations, notAllowedCombinations);
  }
コード例 #5
0
ファイル: HiveDRTest.java プロジェクト: rpatil26/falcon
 @DataProvider
 public Object[][] getRecipeLocation() {
   return MatrixUtil.crossProduct(RecipeExecLocation.values());
 }