Examples of PathCleaner


Examples of com.denimgroup.threadfix.framework.engine.cleaner.PathCleaner

    @Nonnull
    private final FindingProcessor noSourceProcessor;

    public PartialSourceFindingProcessor(@Nonnull ProjectConfig projectConfig,
                                         @Nonnull Scan scan) {
        PathCleaner cleaner = PathCleanerFactory.getPathCleaner(
                projectConfig.getFrameworkType(), ThreadFixInterface.toPartialMappingList(scan));

        noSourceProcessor = new NoSourceFindingProcessor(cleaner);

        database = PartialMappingsDatabaseFactory.getPartialMappingsDatabase(
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.cleaner.PathCleaner

    private int numberMissed = 0, total = 0, foundParameter;
    private long startTime = 0L;

    public FullSourceFindingProcessor(ProjectConfig config, Scan scan) {
        PathCleaner cleaner = PathCleanerFactory.getPathCleaner(
                config.getFrameworkType(), ThreadFixInterface.toPartialMappingList(scan));

        noSourceProcessor = new NoSourceFindingProcessor(cleaner);

        database = EndpointDatabaseFactory.getDatabase(config.getRootFile(),
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.cleaner.PathCleaner

 
  @Test
  public void dynamicTest() {
    String dynamicRoot = "/petclinic", staticRoot = "";
   
    PathCleaner cleaner = new SpringPathCleaner(dynamicRoot, staticRoot);
   
    System.out.println(cleaner);
   
    assertTrue("Didn't save dynamic root correctly", cleaner.getDynamicRoot().equals(dynamicRoot));
    assertTrue("Didn't save static root correctly", cleaner.getStaticRoot().equals(staticRoot));
   
    for (String[] test : petClinicAppScanData) {
      String testDescription = test[0] + " => " + test[1];
      String result = cleaner.cleanDynamicPath(test[0]);
     
      assertTrue("Got " + result + " for test " + testDescription,
          result.equals(test[1]));
    }
  }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.cleaner.PathCleaner

 
  @Test
  public void staticTest() {
    String dynamicRoot = "/petclinic", staticRoot = TestConstants.PETCLINIC_SOURCE_LOCATION;
   
    PathCleaner cleaner = new SpringPathCleaner(dynamicRoot, staticRoot);
   
    System.out.println(cleaner);
   
    assertTrue("Didn't save dynamic root correctly", cleaner.getDynamicRoot().equals(dynamicRoot));
    assertTrue("Didn't save static root correctly", cleaner.getStaticRoot().equals(staticRoot));
   
    for (String[] test : petClinicFortifyData) {
      String testDescription = test[0] + " => " + test[1];
      String result = cleaner.cleanStaticPath(test[0]);
     
      assertTrue("Got " + result + " for test " + testDescription,
          result.equals(test[1]));
    }
  }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.cleaner.PathCleaner

  private PartialMappingsDatabaseFactory() {}
 
  @Nullable
    public static PartialMappingDatabase getPartialMappingsDatabase(@Nonnull List<PartialMapping> seedMappings,
                                                                    @Nonnull FrameworkType frameworkType) {
    PathCleaner cleaner = PathCleanerFactory.getPathCleaner(frameworkType, seedMappings);
   
    return new DefaultPartialMappingDatabase(seedMappings, cleaner);
  }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.cleaner.PathCleaner

    return getDatabase(rootFile, frameworkType, new ArrayList<PartialMapping>());
  }
 
  @Nullable
    public static EndpointDatabase getDatabase(@Nonnull File rootFile, @Nonnull FrameworkType frameworkType, List<PartialMapping> partialMappings) {
    PathCleaner cleaner = PathCleanerFactory.getPathCleaner(frameworkType, partialMappings);
   
    return getDatabase(rootFile, frameworkType, cleaner);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.