Package tests.support

Examples of tests.support.Support_TestProvider


   * @tests java.security.Security#removeProvider(java.lang.String)
   */
  public void test_removeProviderLjava_lang_String() {
    // Test for method void
    // java.security.Security.removeProvider(java.lang.String)
    Provider test = new Support_TestProvider();
    Provider entrust = new Support_ProviderTrust();
    try {
      // Make sure provider not already loaded. Should do nothing
      // if not already loaded.
      Security.removeProvider(test.getName());

      // Now add it
      int addResult = Security.addProvider(test);
      assertTrue("Failed to add provider", addResult != -1);

      Security.removeProvider(test.getName());
      assertNull(
          "the provider TestProvider is found after it was removed",
          Security.getProvider(test.getName()));

      // Make sure entrust provider not already loaded. Should do nothing
      // if not already loaded.
      Security.removeProvider(entrust.getName());

      // Now add entrust
      addResult = Security.addProvider(entrust);
      assertTrue("Failed to add provider", addResult != -1);

      Security.removeProvider(entrust.getName());
      Provider provTest[] = Security.getProviders();
      for (int i = 0; i < provTest.length; i++) {
        assertTrue(
            "the provider entrust is found after it was removed",
            provTest[i].getName() != entrust.getName());
      }
    } finally {
      // Tidy up - the following calls do nothing if the providers were
      // already removed above.
      Security.removeProvider(test.getName());
      Security.removeProvider(entrust.getName());
    }
  }
View Full Code Here


   * Sets up the fixture, for example, open a network connection. This method
   * is called before a test is executed.
   */
  protected void setUp() throws Exception {
        super.setUp();
        support_TestProvider = new Support_TestProvider();
        Security.addProvider(support_TestProvider);
    }
View Full Code Here

   * Sets up the fixture, for example, open a network connection. This method
   * is called before a test is executed.
   */
  protected void setUp() throws Exception {
        super.setUp();
        support_TestProvider = new Support_TestProvider();
        Security.addProvider(support_TestProvider);
    }
View Full Code Here

   * @tests java.security.Security#removeProvider(java.lang.String)
   */
  public void test_removeProviderLjava_lang_String() {
    // Test for method void
    // java.security.Security.removeProvider(java.lang.String)
    Provider test = new Support_TestProvider();
    Provider entrust = new Support_ProviderTrust();
    try {
      // Make sure provider not already loaded. Should do nothing
      // if not already loaded.
      Security.removeProvider(test.getName());

      // Now add it
      int addResult = Security.addProvider(test);
      assertTrue("Failed to add provider", addResult != -1);

      Security.removeProvider(test.getName());
      assertNull(
          "the provider TestProvider is found after it was removed",
          Security.getProvider(test.getName()));

      // Make sure entrust provider not already loaded. Should do nothing
      // if not already loaded.
      Security.removeProvider(entrust.getName());

      // Now add entrust
      addResult = Security.addProvider(entrust);
      assertTrue("Failed to add provider", addResult != -1);

      Security.removeProvider(entrust.getName());
      Provider provTest[] = Security.getProviders();
      for (int i = 0; i < provTest.length; i++) {
        assertTrue(
            "the provider entrust is found after it was removed",
            provTest[i].getName() != entrust.getName());
      }
    } finally {
      // Tidy up - the following calls do nothing if the providers were
      // already removed above.
      Security.removeProvider(test.getName());
      Security.removeProvider(entrust.getName());
    }
  }
View Full Code Here

TOP

Related Classes of tests.support.Support_TestProvider

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.