Examples of verify()


Examples of org.jbehave.core.mock.Mock.verify()

        mock.expects("doSomething").with(eq("A"));
       
        ((Foo)mock).doSomething("A");
       
        try {
            mock.verify();
        } catch (VerificationException ve) {
            Ensure.that(false);
        }
    }
   
View Full Code Here

Examples of org.jbehave.core.model.OutcomesTable.verify()

        // 2nd scenario
        reporter.beforeScenario("A failing scenario");
        OutcomesTable outcomesTable = new OutcomesTable();
        outcomesTable.addOutcome("I don't return all", 100.0, equalTo(50.));
        try {
            outcomesTable.verify();
        } catch (UUIDExceptionWrapper e) {
            reporter.failedOutcomes("Then I don't return loan", ((OutcomesFailed)e.getCause()).outcomesTable());
        }
        reporter.notPerformed("Then I should have $20");
        ExamplesTable table = new ExamplesTable("|money|to|\n|$30|Mauro|\n|$50|Paul|\n");
View Full Code Here

Examples of org.jboss.aerogear.crypto.signature.VerifyKey.verify()

    public void testSignMessageAsBytes() throws Exception {
        SigningKey key = new SigningKey();
        byte[] signMessage = HEX.decode(SIGN_MESSAGE);
        byte[] signedMessage = key.sign(HEX.decode(SIGN_MESSAGE));
        VerifyKey verifyKey = new VerifyKey(key.getPublicKey());
        Boolean isValid = verifyKey.verify(signMessage, signedMessage);
        assertTrue("Message sign has failed", isValid);
    }

    @Test
    public void testSignMessageAsHex() throws Exception {
View Full Code Here

Examples of org.jboss.as.webservices.verification.JwsWebServiceEndpointVerifier.verify()

        try {
            final Class<?> endpointInterfaceClass = endpointInterfaceClassName.length() > 0 ? moduleClassLoader
                    .loadClass(endpointInterfaceClassName) : null;
            final JwsWebServiceEndpointVerifier wsEndpointVerifier = new JwsWebServiceEndpointVerifier(
                    endpointClass, endpointInterfaceClass, deploymentReflectionIndex);
            wsEndpointVerifier.verify();
            if (wsEndpointVerifier.failed()) {
                wsEndpointVerifier.logFailures();
                throw WSLogger.ROOT_LOGGER.jwsWebServiceClassVerificationFailed(endpointClass);
            }
        } catch (ClassNotFoundException e) {
View Full Code Here

Examples of org.jboss.forge.classloader.mock.collisions.ClassWithClassAsParameter.verify()

      ClassWithClassAsParameter classFilter = (ClassWithClassAsParameter) enhancedFilter;

      Assert.assertTrue(Proxies.isForgeProxy(classFilter));

      Assert.assertTrue(classFilter.verify(foreignType));
      Assert.assertTrue(classFilter.verify(delegate.getClass()));
      Assert.assertTrue(classFilter.verify(enhancedFactory.getClass()));

   }
View Full Code Here

Examples of org.jboss.forge.classloader.mock.collisions.ClassWithListAsParameter.verify()

      Assert.assertTrue(Proxies.isForgeProxy(classFilter));

      List<Object> list = new ArrayList<Object>();
      list.add(enhancedResult);
      list.add(delegateResult);
      Assert.assertTrue(classFilter.verify(list));

   }
}
View Full Code Here

Examples of org.jboss.resteasy.security.doseta.DKIMSignature.verify()

         System.out.println("Header: " + name);
      }
      Assert.assertNotNull(signatureHeader);

      DKIMSignature contentSignature = new DKIMSignature(signatureHeader);
      contentSignature.verify(response.getHeaders(), marshalledEntity.getMarshalledBytes(), keys.getPublic());
   }

   @Test
   public void testBasicVerification() throws Exception
   {
View Full Code Here

Examples of org.jboss.resteasy.security.doseta.Verification.verify()

      requiredAttributes.put("path", "/hello/world");

      Verification verification = new Verification();
      verification.getRequiredAttributes().put("path", "/hello/world");

      MultivaluedMap<String, String> verifiedHeaders = verification.verify(verified, headers, null, keys.getPublic());
      Assert.assertEquals(verifiedHeaders.size(), 1);
      List<String> visas = verifiedHeaders.get("Visa");
      Assert.assertNotNull(visas);
      Assert.assertEquals(visas.size(), 2);
      System.out.println(visas);
View Full Code Here

Examples of org.jboss.resteasy.security.smime.PKCS7SignatureInput.verify()

      String signed = new SkeletonKeyClientBuilder().username("jsmith").password("foobar").idp(target).obtainSignedToken("Skeleton Key");
      System.out.println(signed);
      PKCS7SignatureInput input = new PKCS7SignatureInput(signed);
      input.setCertificate(certificate);
      Assert.assertTrue(input.verify());
      client.close();
   }


   @Test
View Full Code Here

Examples of org.jboss.resteasy.security.smime.SignedInput.verify()

      WebTarget target = client.target("http://localhost:9095/smime/signed");
      SignedInput input = target.request().get(SignedInput.class);
      Customer cust = (Customer)input.getEntity(Customer.class);
      System.out.println("Signed Message From Server: ");
      System.out.println(cust);
      input.verify(cert);

   }

   @Test
   public void testSignedPost() throws Exception
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.