Examples of generateEndpoints()


Examples of com.denimgroup.threadfix.framework.engine.full.EndpointDatabase.generateEndpoints()

        List<Endpoint> endpoints = list();

        EndpointDatabase database = EndpointDatabaseFactory.getDatabase(rootFile);

        if (database != null) {
            endpoints = database.generateEndpoints();
        }

    Collections.sort(endpoints);
   
    if (endpoints.isEmpty()) {
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointDatabase.generateEndpoints()

            if (database == null) {
                errorMessages.add("Database was null for project " + project);
            } else if (database.getFrameworkType() != FrameworkType.DOT_NET_MVC) {
                errorMessages.add("Got " + database.getFrameworkType() + " instead of DOT_NET for " + project);
            } else if (database.generateEndpoints().size() == 0) {
                errorMessages.add("Database was empty for "  + project);
            }
        }

        if (!errorMessages.isEmpty()) {
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointDatabase.generateEndpoints()

  public void testRootOnly() {
    EndpointDatabase testDatabase = EndpointDatabaseFactory.getDatabase(new File(TestConstants.PETCLINIC_SOURCE_LOCATION));

        assertTrue(testDatabase != null);
    assertTrue(testDatabase.getFrameworkType() == FrameworkType.SPRING_MVC);
    assertTrue(testDatabase.generateEndpoints().size() ==
        new SpringControllerMappings(new File(TestConstants.PETCLINIC_SOURCE_LOCATION)).generateEndpoints().size());
  }
 
  // TODO write more stuff here
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator.generateEndpoints()

   
    EndpointGenerator generator =
        EndpointDatabaseFactory.getDatabase(getProjectConfig(application));
   
    if (generator != null) {
            List<Endpoint> endpoints = generator.generateEndpoints();


      return RestResponse.success(getEndpointInfo(endpoints));
    } else {
      return RestResponse.failure("Unable to create an EndpointGenerator.");
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator.generateEndpoints()

    @Test
    public void testAllFrameworks() {
        for (String app : SpringDetectionTests.ALL_SPRING_APPS) {
            EndpointGenerator mappings = new SpringControllerMappings(new File(TestConstants.getFolderName(app)));
            assertFalse("No endpoints found in app " + app + ".", mappings.generateEndpoints().isEmpty());
        }
    }

    @Test
    public void testModelBindingRecognition() {
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator.generateEndpoints()

    }

    public void writeCsvFile() {
        for (String app : SpringDetectionTests.ALL_SPRING_APPS) {
            EndpointGenerator mappings = new SpringControllerMappings(new File(TestConstants.getFolderName(app)));
            for (Endpoint endpoint : mappings.generateEndpoints()) {
                System.out.print(app + ",");
                System.out.println(endpoint.getCSVLine());
            }
        }
    }
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator.generateEndpoints()

    @Test
    public void testBasic() {
        EndpointGenerator endpointGenerator = new WebFormsEndpointGenerator(new File(TestConstants.WEB_FORMS_SAMPLE));

        List<Endpoint> endpoints = endpointGenerator.generateEndpoints();
        assert !endpoints.isEmpty() : "Got empty endpoints for " + TestConstants.WEB_FORMS_SAMPLE;

        Set<String> parameters = endpoints.get(0).getParameters();
        assert parameters.contains("newitem") :
            "Parameters didn't contain newitem: " + parameters;
View Full Code Here

Examples of com.denimgroup.threadfix.framework.engine.full.EndpointGenerator.generateEndpoints()

    @Test
    public void testBasicDirectoryResolution() {
        EndpointGenerator endpointGenerator = new WebFormsEndpointGenerator(new File(TestConstants.RISK_E_UTILITY));

        List<Endpoint> endpoints = endpointGenerator.generateEndpoints();
        assert !endpoints.isEmpty() : "Got empty endpoints for " + TestConstants.RISK_E_UTILITY;

        boolean gotPage = false;

        for (Endpoint endpoint : endpoints) {
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.