Package eu.admire.clienttoolkit.core

Examples of eu.admire.clienttoolkit.core.ValidationResult


      //SSLClientSettings.setKeystores(keystore);
      //SSLClientSettings.disableHostnameVerification();

      Gateway gw = GatewayFactory.get(url);

      ValidationResult validationResult = gw.validate(Util
          .getFileContentAsString(dispel.getLocation().toString()));

      if (validationResult.getSubmittedGraphs().size() > 0) {

        graph = validationResult.getSubmittedGraphs().get(0);
        //No need to call GPM as in ExecuteHandler
      }
     
    } catch (final Exception e) {
View Full Code Here


  @Test
  public void validateTest() throws Exception
  {
      Gateway g = GatewayFactory.get(GATEWAY_ADDRESS);

      ValidationResult v = g.validate(DISPEL_REQUEST);
      assertTrue(v.getSubmittedGraphs().get(0).contains("<svg"));
     
      //Don't expect any errors or objects for this
      assertTrue(v.isValid());
      assertTrue(v.getErrors().isEmpty());
      assertEquals(0, v.getRegisteredObjects().size());
  }
View Full Code Here

    {
        Gateway g = GatewayFactory.get(GATEWAY_ADDRESS);
 
        //Give it rubbish, expect an error and no graph
        String dispelRequest = "This is a nonsense request";
        ValidationResult v = g.validate(dispelRequest);
     
        assertFalse(v.isValid());
        assertFalse(v.getErrors().trim().isEmpty());
       
        assertEquals(0, v.getRegisteredObjects().size());
  }
View Full Code Here

TOP

Related Classes of eu.admire.clienttoolkit.core.ValidationResult

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.