Update of /cvsroot/sblim/wbemsmt-dns-bl/java/org/sblim/wbemsmt/dns/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14080/java/org/sblim/wbemsmt/dns/test Added Files: DNSTest_DnsConfiguration_getall.java DNSTest_DnsHintZone_print.java DNSTest_DnsSetting_associations.java DNSTest_DnsSetting_print.java DNSTest_DnsIPAddress_modify.java DNSTest_DnsZone_associations.java DNSTest_DnsAML_getall.java DNSTest_DnsHintZone_modify.java DNSTest_DnsSetting_delete.java DNSTest_DnsMasterZone_reverse.java DNSTest_DnsZone_list.java DNSTest_DnsZone_getall.java DNSTest_DnsService_associations.java DNSTest_DnsMasterZone_create.java DNSTest_DnsService_print.java DNSTest_DnsIPAddress_print.java DNSTest_DnsHintZone_delete.java DNSTest_DnsSlaveZone_list.java DNSTest_DnsHintZone_list.java DNSTest_DnsSlaveZone_print.java DNSTest_DnsMasterZone_associations.java DNSTest_ResourceRecord_print.java DNSTest_DnsConfiguration_print.java DNSTest_DnsSlaveZone_associations.java DNSTest_DnsSlaveZone_create.java DNSTest_DnsForwardZone_create.java DNSTest_DnsIPAddress_list.java DNSTest_DnsSetting_list.java DNSTest_DnsSlaveZone_modify.java DNSTestSuite.java DNSTest_DnsForwardZone_delete.java DNSTest_DnsHintZone_create.java DNSTest_DnsSetting_modify.java DNSTest_DnsAML_list.java DNSTest_DnsHintZone_getall.java DNSTest_DnsSlaveZone_getall.java DNSTest_DnsZone_print.java DNSTest_DnsAML_delete.java DNSTest_DnsSetting_getall.java DNSTest_DnsForwardZone_list.java DNSTest_ResourceRecord_list.java DNSTest_ResourceRecord_getall.java DNSTest_DnsAML_associations.java DNSTest_DnsConfiguration_associations.java DNSTest_DnsAclInService.java DNSTest_DnsIPAddress_delete.java DNSTest_DnsService_list.java DNSTest_DnsMasterZone_list.java DNSTest_DnsMasterZone_modify.java DNSTest_DnsAML_create.java DNSTest_DnsIPAddress_getall.java DNSTest_BaseClass.java DNSTest_DnsMasterZone_print.java DNSTest_DnsForwardZone_getall.java DNSTest_DnsHintZone_associations.java DNSTest_DnsAML_print.java DNSTest_DnsMasterZone_delete.java DNSTest_DnsConfiguration_list.java DNSTest_DnsService_getall.java DNSTest_DnsSlaveZone_delete.java DNSTest_DnsMasterZone_getall.java DNSTest_DnsForwardZone_print.java DNSTest_DnsForwardZone_associations.java DNSTest_DnsAclInZone.java DNSTest_DnsAML_modify.java DNSTest_DnsIPAddress_associations.java DNSTest_DnsForwardZone_modify.java DNSTest_DnsIPAddress_create.java Log Message: WBEM-SMT DNS BusinessLogic component. First initial upload. --- NEW FILE: DNSTest_DnsMasterZone_delete.java --- /** * DNSTest_DnsMasterZone_delete.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Jun 14, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSMasterZone; import org.sblim.wbemsmt.exception.InvalidParameterException; /** * Author ceron * */ public class DNSTest_DnsMasterZone_delete extends DNSTest_BaseClass { public DNSTest_DnsMasterZone_delete(String arg0){ super(arg0); } public void testDeleteDnsMasterZone01(){ DNSMasterZone zone = null; ArrayList a = DNSMasterZone.enumerateInstanceNames(this.cimClient); Iterator i = a.iterator(); CIMObjectPath op = null; try{ while(i.hasNext()){ op = (CIMObjectPath) i.next(); zone = (DNSMasterZone) DNSMasterZone.getInstance(this.cimClient,op); if("GhostMasterZone".equals(zone.getName())){ DNSMasterZone.deleteInstance(this.cimClient,zone); } } }catch (Exception e){ e.printStackTrace(); Assert.fail("testDeleteDnsMasterZone01 failed: " + e.getMessage()); } System.out.println("testDeleteDnsMasterZone01: completed"); } public void testDeleteDnsMasterZone02(){ DNSMasterZone zone = null; try{ DNSMasterZone.deleteInstance(this.cimClient,zone); }catch (InvalidParameterException e){ System.out.println("testDeleteDnsMasterZone02: Got InvalidParameterException as expected"); }catch (Exception e){ e.printStackTrace(); Assert.fail("testDeleteDnsMaster02 failed: " + e.getMessage()); } } } --- NEW FILE: DNSTest_DnsAML_print.java --- /** * DNSTest_DnsAML_print.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 26, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import junit.framework.Assert; import org.sblim.wbemsmt.dns.bl.fco.DNSAddressMatchList; /** * Author ceron * */ public class DNSTest_DnsAML_print extends DNSTest_BaseClass { /** * Constructor for DNSTest. * @param arg0 */ public DNSTest_DnsAML_print(String arg0) { super(arg0); } public void testPrintDnsAML01() { try { ArrayList amlList = DNSAddressMatchList.enumerateInstanceNames(cimClient); System.out.println("______________________________"); for (int i=0; amlList != null && i < amlList.size(); i++) { System.out.println(amlList.get(i)); } System.out.println("_______________________________"); System.out.println("testPrintDnsAML01 completed. Printed " + amlList.size() + " address match list ObjectPath entries."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsAML01 failed: " + e.getMessage()); } } public void testPrintDnsAML02() { try { ArrayList amlList = DNSAddressMatchList.enumerateInstances(this.cimClient); for (int i=0; amlList != null && i < amlList.size(); i++) { System.out.println("_____________________________"); System.out.println(amlList.get(i)); } System.out.println("testPrintDnsAML02 completed. Printed " + amlList.size() + " Instances."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsAML02 failed: " + e.getMessage()); } } } --- NEW FILE: DNSTest_DnsAML_getall.java --- /** * DNSTest_DnsAML_getall.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 26, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSAddressMatchList; /** * Author ceron * */ public class DNSTest_DnsAML_getall extends DNSTest_BaseClass { /**The objective of this test is to test the get* methods from * DNSAddressMatchList * @param arg0 */ public DNSTest_DnsAML_getall(String arg0){ super(arg0); } public void testSingleDnsAML01(){ ArrayList arraylist = null; Iterator rri = null; DNSAddressMatchList aml = null; CIMObjectPath op = null; String name = null; String serviceName = null; Short addressListType = null; String addressListTypeString = null; Object addressList[] = null; try{ arraylist = DNSAddressMatchList.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsAML01 failed: " + e.getMessage()); } rri = arraylist.iterator(); while(rri.hasNext()){ op = (CIMObjectPath)rri.next(); try{ aml = (DNSAddressMatchList) DNSAddressMatchList.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsAML01 failed: " + e.getMessage()); } try{ serviceName = aml.getServiceName(); name = aml.getName(); addressListType = aml.getAddressListType(); addressListTypeString = aml.getAddressListTypeString(); addressList = aml.getAddressList(); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsAML01 failed: " + e.getMessage()); } System.out.println("_________________________"); System.out.println("Name: " + name); System.out.println("ServiceName: " + serviceName); System.out.println("AddressListType: " + addressListType + " -> " + addressListTypeString); System.out.println("AddressList:"); for(int i=0; i < addressList.length; i++) System.out.println(" "+ addressList[i]); } System.out.println("_________________________"); System.out.println("testSingleDnsAML01 completed. Got " + arraylist.size()+ " address match list instances"); } } --- NEW FILE: DNSTest_DnsZone_print.java --- /** * DNSTest_DnsZone_print.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 20, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import junit.framework.Assert; import org.sblim.wbemsmt.dns.bl.fco.DNSZone; /** * Author ceron * */ public class DNSTest_DnsZone_print extends DNSTest_BaseClass{ /** * Constructor for DNSTest. * @param arg0 */ public DNSTest_DnsZone_print(String arg0) { super(arg0); } public void testPrintDnsZone01() { try { ArrayList dnsZoneList = DNSZone.enumerateInstanceNames(cimClient); System.out.println("______________________________"); for (int i=0; dnsZoneList != null && i < dnsZoneList.size(); i++) { System.out.println(dnsZoneList.get(i)); } System.out.println("_______________________________"); System.out.println("testPrintDnsZone01 completed. Printed " + dnsZoneList.size() + " DnsZone ObjectPath entries."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsZone01 failed: " + e.getMessage()); } } public void testPrintDnsZone02() { try { ArrayList dnsZoneList = DNSZone.enumerateInstances(this.cimClient); for (int i=0; dnsZoneList != null && i < dnsZoneList.size(); i++) { System.out.println("_____________________________"); System.out.println(dnsZoneList.get(i)); } System.out.println("testPrintDnsZone02 completed. Printed " + dnsZoneList.size() + " DnsZone Instances."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsZone02 failed: " + e.getMessage()); } } } --- NEW FILE: DNSTestSuite.java --- /** * DNSTestSuite.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Wolfgang Taphorn <ta...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on Mar 16, 2005 * */ package org.sblim.wbemsmt.dns.test; import junit.framework.Test; import junit.framework.TestSuite; /** * Author taphorn * */ public class DNSTestSuite extends TestSuite { public static void main(String[] args) { junit.swingui.TestRunner.run(DNSTestSuite.class); } public static Test suite() { TestSuite suite= new TestSuite(); //========== //List Resource Records suite.addTest(new DNSTest_ResourceRecord_list("testListDnsResourceRecord01")); suite.addTest(new DNSTest_ResourceRecord_list("testListDnsResourceRecord02")); suite.addTest(new DNSTest_ResourceRecord_list("testListDnsResourceRecord03")); suite.addTest(new DNSTest_ResourceRecord_list("testListDnsResourceRecord04")); //Print Resource Records suite.addTest(new DNSTest_ResourceRecord_print("testPrintDnsResourceRecord01")); suite.addTest(new DNSTest_ResourceRecord_print("testPrintDnsResourceRecord02")); //Get a specific RR and print its data suite.addTest(new DNSTest_ResourceRecord_getall("testSingleDnsResourceRecord01")); //=========== //List Dns Master Zones only suite.addTest(new DNSTest_DnsMasterZone_list("testListDnsMasterZone01")); suite.addTest(new DNSTest_DnsMasterZone_list("testListDnsMasterZone02")); suite.addTest(new DNSTest_DnsMasterZone_list("testListDnsMasterZone03")); suite.addTest(new DNSTest_DnsMasterZone_list("testListDnsMasterZone04")); //Print Dns Master Zones only suite.addTest(new DNSTest_DnsMasterZone_print("testPrintDnsMasterZone01")); suite.addTest(new DNSTest_DnsMasterZone_print("testPrintDnsMasterZone02")); //Get a specific DnsMasterZone and print its data suite.addTest(new DNSTest_DnsMasterZone_getall("testSingleDnsMasterZone01")); //Modify the data of a master Zone suite.addTest(new DNSTest_DnsMasterZone_modify("testModifyDnsMasterZone01")); suite.addTest(new DNSTest_DnsMasterZone_modify("testModifyDnsMasterZone02")); suite.addTest(new DNSTest_DnsMasterZone_modify("testModifyDnsMasterZone03")); //Get the associations of a master Zone suite.addTest(new DNSTest_DnsMasterZone_associations("testAssociationsDnsMasterZone01")); suite.addTest(new DNSTest_DnsMasterZone_associations("testAssociationsDnsMasterZone02")); suite.addTest(new DNSTest_DnsMasterZone_associations("testAssociationsDnsMasterZone03")); suite.addTest(new DNSTest_DnsMasterZone_associations("testAssociationsDnsMasterZone04")); suite.addTest(new DNSTest_DnsMasterZone_associations("testAssociationsDnsMasterZone05")); suite.addTest(new DNSTest_DnsMasterZone_associations("testAssociationsDnsMasterZone06")); //Create a master zone match list suite.addTest(new DNSTest_DnsMasterZone_create("testCreateDnsMasterZone01")); suite.addTest(new DNSTest_DnsMasterZone_create("testCreateDnsMasterZone02")); //Delete previous master zone match list suite.addTest(new DNSTest_DnsMasterZone_delete("testDeleteDnsMasterZone01")); suite.addTest(new DNSTest_DnsMasterZone_delete("testDeleteDnsMasterZone02")); //Reverse of Master zone networks suite.addTest(new DNSTest_DnsMasterZone_reverse("testReverseDnsMasterZone01")); suite.addTest(new DNSTest_DnsMasterZone_reverse("testReverseDnsMasterZone02")); suite.addTest(new DNSTest_DnsMasterZone_reverse("testReverseDnsMasterZone03")); //=========== //List Dns Slave Zones only suite.addTest(new DNSTest_DnsSlaveZone_list("testListDnsSlaveZone01")); suite.addTest(new DNSTest_DnsSlaveZone_list("testListDnsSlaveZone02")); suite.addTest(new DNSTest_DnsSlaveZone_list("testListDnsSlaveZone03")); suite.addTest(new DNSTest_DnsSlaveZone_list("testListDnsSlaveZone04")); //Print Dns Slave Zones only suite.addTest(new DNSTest_DnsSlaveZone_print("testPrintDnsSlaveZone01")); suite.addTest(new DNSTest_DnsSlaveZone_print("testPrintDnsSlaveZone02")); //Get a specific DnsSlaveZone and print its data suite.addTest(new DNSTest_DnsSlaveZone_getall("testSingleDnsSlaveZone01")); //Modify the data of a slave Zone suite.addTest(new DNSTest_DnsSlaveZone_modify("testModifyDnsSlaveZone01")); suite.addTest(new DNSTest_DnsSlaveZone_modify("testModifyDnsSlaveZone02")); suite.addTest(new DNSTest_DnsSlaveZone_modify("testModifyDnsSlaveZone03")); //Get the associations of a slave Zone suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone01")); suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone02")); suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone03")); suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone04")); suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone05")); suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone06")); suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone09")); suite.addTest(new DNSTest_DnsSlaveZone_associations("testAssociationsDnsSlaveZone10")); //Create a slave zone match list suite.addTest(new DNSTest_DnsSlaveZone_create("testCreateDnsSlaveZone01")); suite.addTest(new DNSTest_DnsSlaveZone_create("testCreateDnsSlaveZone02")); //Delete previous slave zone match list suite.addTest(new DNSTest_DnsSlaveZone_delete("testDeleteDnsSlaveZone01")); suite.addTest(new DNSTest_DnsSlaveZone_delete("testDeleteDnsSlaveZone02")); //=========== //List Dns Hint Zones only suite.addTest(new DNSTest_DnsHintZone_list("testListDnsHintZone01")); suite.addTest(new DNSTest_DnsHintZone_list("testListDnsHintZone02")); suite.addTest(new DNSTest_DnsHintZone_list("testListDnsHintZone03")); suite.addTest(new DNSTest_DnsHintZone_list("testListDnsHintZone04")); //Print Dns Hint Zones only suite.addTest(new DNSTest_DnsHintZone_print("testPrintDnsHintZone01")); suite.addTest(new DNSTest_DnsHintZone_print("testPrintDnsHintZone02")); //Get a specific DnsHintZone and print its data suite.addTest(new DNSTest_DnsHintZone_getall("testSingleDnsHintZone01")); //Modify the data of a hint Zone suite.addTest(new DNSTest_DnsHintZone_modify("testModifyDnsHintZone01")); suite.addTest(new DNSTest_DnsHintZone_modify("testModifyDnsHintZone02")); suite.addTest(new DNSTest_DnsHintZone_modify("testModifyDnsHintZone03")); //Create a hint zone match list suite.addTest(new DNSTest_DnsHintZone_create("testCreateDnsHintZone01")); suite.addTest(new DNSTest_DnsHintZone_create("testCreateDnsHintZone02")); //Delete previous hint zone match list suite.addTest(new DNSTest_DnsHintZone_delete("testDeleteDnsHintZone01")); suite.addTest(new DNSTest_DnsHintZone_delete("testDeleteDnsHintZone02")); //Get the associations of a hint Zone suite.addTest(new DNSTest_DnsHintZone_associations("testAssociationsDnsHintZone01")); suite.addTest(new DNSTest_DnsHintZone_associations("testAssociationsDnsHintZone02")); //=========== //List Dns Forward Zones only suite.addTest(new DNSTest_DnsForwardZone_list("testListDnsForwardZone01")); suite.addTest(new DNSTest_DnsForwardZone_list("testListDnsForwardZone02")); suite.addTest(new DNSTest_DnsForwardZone_list("testListDnsForwardZone03")); suite.addTest(new DNSTest_DnsForwardZone_list("testListDnsForwardZone04")); //Print Dns Forward Zones only suite.addTest(new DNSTest_DnsForwardZone_print("testPrintDnsForwardZone01")); suite.addTest(new DNSTest_DnsForwardZone_print("testPrintDnsForwardZone02")); //Get a specific DnsForwardZone and print its data suite.addTest(new DNSTest_DnsForwardZone_getall("testSingleDnsForwardZone01")); //Modify the data of a forward Zone suite.addTest(new DNSTest_DnsForwardZone_modify("testModifyDnsForwardZone01")); suite.addTest(new DNSTest_DnsForwardZone_modify("testModifyDnsForwardZone02")); suite.addTest(new DNSTest_DnsForwardZone_modify("testModifyDnsForwardZone03")); //Create a forward zone match list suite.addTest(new DNSTest_DnsForwardZone_create("testCreateDnsForwardZone01")); suite.addTest(new DNSTest_DnsForwardZone_create("testCreateDnsForwardZone02")); //Delete previous forward zone match list suite.addTest(new DNSTest_DnsForwardZone_delete("testDeleteDnsForwardZone01")); suite.addTest(new DNSTest_DnsForwardZone_delete("testDeleteDnsForwardZone02")); //Get the associations of a forward Zone suite.addTest(new DNSTest_DnsForwardZone_associations("testAssociationsDnsForwardZone01")); suite.addTest(new DNSTest_DnsForwardZone_associations("testAssociationsDnsForwardZone02")); //========== // List Adress Match Lists suite.addTest(new DNSTest_DnsAML_list("testListDnsAML01")); suite.addTest(new DNSTest_DnsAML_list("testListDnsAML02")); suite.addTest(new DNSTest_DnsAML_list("testListDnsAML03")); suite.addTest(new DNSTest_DnsAML_list("testListDnsAML04")); //Print Address Match Lists suite.addTest(new DNSTest_DnsAML_print("testPrintDnsAML01")); suite.addTest(new DNSTest_DnsAML_print("testPrintDnsAML02")); //Get a specific Address Match List and print its data suite.addTest(new DNSTest_DnsAML_getall("testSingleDnsAML01")); //Modify the data of an Address Match List suite.addTest(new DNSTest_DnsAML_modify("testModifyDnsAML01")); suite.addTest(new DNSTest_DnsAML_modify("testModifyDnsAML02")); suite.addTest(new DNSTest_DnsAML_modify("testModifyDnsAML03")); //Get the associations of an Address Match List suite.addTest(new DNSTest_DnsAML_associations("testAssociationsDnsAML01")); suite.addTest(new DNSTest_DnsAML_associations("testAssociationsDnsAML02")); suite.addTest(new DNSTest_DnsAML_associations("testAssociationsDnsAML03")); suite.addTest(new DNSTest_DnsAML_associations("testAssociationsDnsAML04")); //Create an address match list suite.addTest(new DNSTest_DnsAML_create("testCreateDnsAML01")); suite.addTest(new DNSTest_DnsAML_create("testCreateDnsAML02")); //Delete previous address match list suite.addTest(new DNSTest_DnsAML_delete("testDeleteDnsAML01")); suite.addTest(new DNSTest_DnsAML_delete("testDeleteDnsAML02")); //========== // List ip addresses suite.addTest(new DNSTest_DnsIPAddress_list("testListDnsIPAddress01")); suite.addTest(new DNSTest_DnsIPAddress_list("testListDnsIPAddress02")); suite.addTest(new DNSTest_DnsIPAddress_list("testListDnsIPAddress03")); suite.addTest(new DNSTest_DnsIPAddress_list("testListDnsIPAddress04")); //Print ip addresses suite.addTest(new DNSTest_DnsIPAddress_print("testPrintDnsIPAddress01")); suite.addTest(new DNSTest_DnsIPAddress_print("testPrintDnsIPAddress02")); //Get a specific ip Address and print its data suite.addTest(new DNSTest_DnsIPAddress_getall("testSingleDnsIPAddress01")); //Modify the data of an ip Address suite.addTest(new DNSTest_DnsIPAddress_modify("testModifyDnsIPAddress01")); suite.addTest(new DNSTest_DnsIPAddress_modify("testModifyDnsIPAddress02")); suite.addTest(new DNSTest_DnsIPAddress_modify("testModifyDnsIPAddress03")); //Get the associations of an ip Address suite.addTest(new DNSTest_DnsIPAddress_associations("testAssociationsDnsIPAddress01")); suite.addTest(new DNSTest_DnsIPAddress_associations("testAssociationsDnsIPAddress02")); //Create an ip address suite.addTest(new DNSTest_DnsIPAddress_create("testCreateDnsIPAddress01")); suite.addTest(new DNSTest_DnsIPAddress_create("testCreateDnsIPAddress02")); //Delete previous ip address suite.addTest(new DNSTest_DnsIPAddress_delete("testDeleteDnsIPAddress01")); suite.addTest(new DNSTest_DnsIPAddress_delete("testDeleteDnsIPAddress02")); //========== // List dns services suite.addTest(new DNSTest_DnsService_list("testListDnsService01")); suite.addTest(new DNSTest_DnsService_list("testListDnsService02")); suite.addTest(new DNSTest_DnsService_list("testListDnsService03")); suite.addTest(new DNSTest_DnsService_list("testListDnsService04")); //Print dns services suite.addTest(new DNSTest_DnsService_print("testPrintDnsService01")); suite.addTest(new DNSTest_DnsService_print("testPrintDnsService02")); //Get a specific dns service and print its data suite.addTest(new DNSTest_DnsService_getall("testSingleDnsService01")); //Get the associations of a dns service suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService01")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService02")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService03")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService04")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService05")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService06")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService07")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService08")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService09")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService10")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService11")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService12")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService13")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService14")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService15")); suite.addTest(new DNSTest_DnsService_associations("testAssociationsDnsService16")); //========== // List dns configuration suite.addTest(new DNSTest_DnsConfiguration_list("testListDnsConfiguration01")); suite.addTest(new DNSTest_DnsConfiguration_list("testListDnsConfiguration02")); suite.addTest(new DNSTest_DnsConfiguration_list("testListDnsConfiguration03")); suite.addTest(new DNSTest_DnsConfiguration_list("testListDnsConfiguration04")); //Print dns configuration suite.addTest(new DNSTest_DnsConfiguration_print("testPrintDnsConfiguration01")); suite.addTest(new DNSTest_DnsConfiguration_print("testPrintDnsConfiguration02")); //Get a specific dns configuration and print its data suite.addTest(new DNSTest_DnsConfiguration_getall("testSingleDnsConfiguration01")); //Get the associations of a dns configuration suite.addTest(new DNSTest_DnsConfiguration_associations("testAssociationsDnsConfiguration01")); suite.addTest(new DNSTest_DnsConfiguration_associations("testAssociationsDnsConfiguration02")); suite.addTest(new DNSTest_DnsConfiguration_associations("testAssociationsDnsConfiguration03")); suite.addTest(new DNSTest_DnsConfiguration_associations("testAssociationsDnsConfiguration04")); //========== // List dns settings suite.addTest(new DNSTest_DnsSetting_list("testListDnsSetting01")); suite.addTest(new DNSTest_DnsSetting_list("testListDnsSetting02")); suite.addTest(new DNSTest_DnsSetting_list("testListDnsSetting03")); suite.addTest(new DNSTest_DnsSetting_list("testListDnsSetting04")); //Print dns settings suite.addTest(new DNSTest_DnsSetting_print("testPrintDnsSetting01")); suite.addTest(new DNSTest_DnsSetting_print("testPrintDnsSetting02")); //Get a specific dns setting and print its data suite.addTest(new DNSTest_DnsSetting_getall("testSingleDnsSetting01")); //Modify the data of a dns setting suite.addTest(new DNSTest_DnsSetting_modify("testModifyDnsSetting01")); suite.addTest(new DNSTest_DnsSetting_modify("testModifyDnsSetting02")); suite.addTest(new DNSTest_DnsSetting_modify("testModifyDnsSetting03")); //Get the associations of a dns setting suite.addTest(new DNSTest_DnsSetting_associations("testAssociationsDnsSetting01")); suite.addTest(new DNSTest_DnsSetting_associations("testAssociationsDnsSetting02")); suite.addTest(new DNSTest_DnsSetting_associations("testAssociationsDnsSetting03")); suite.addTest(new DNSTest_DnsSetting_associations("testAssociationsDnsSetting04")); //======== //Create association between Zone and ACL // suite.addTest(new DNSTest_DnsAclInZone("testDnsAclInZone01")); //delete it // suite.addTest(new DNSTest_DnsAclInZone("testDnsAclInZone01delete")); // suite.addTest(new DNSTest_DnsAclInZone("testDnsAclInZone02")); // suite.addTest(new DNSTest_DnsAclInZone("testDnsAclInZone03")); //delete it // suite.addTest(new DNSTest_DnsAclInZone("testDnsAclInZone03delete")); //======== //Create association between Zone and ACL // suite.addTest(new DNSTest_DnsAclInService("testDnsAclInService01")); //delete it // suite.addTest(new DNSTest_DnsAclInService("testDnsAclInService01delete")); //suite.addTest(new DNSTest_DnsAclInService("testDnsAclInService02")); //delete it //suite.addTest(new DNSTest_DnsAclInService("testDnsAclInService02delete")); return suite; } } --- NEW FILE: DNSTest_DnsHintZone_getall.java --- /** * DNSTest_DnsHintZone_getall.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 21, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSHintZone; /** * Author ceron * */ public class DNSTest_DnsHintZone_getall extends DNSTest_BaseClass { /**The objective of this test is to test the get* methods from * DNSHintZone * @param arg0 */ public DNSTest_DnsHintZone_getall(String arg0){ super(arg0); } public void testSingleDnsHintZone01(){ ArrayList arraylist = null; Iterator rri = null; DNSHintZone dnsHintZone = null; CIMObjectPath op = null; String name = null; Short type = null; String typestr = null; String rr = null; try{ arraylist = DNSHintZone.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsHintZone01 failed: " + e.getMessage()); } rri = arraylist.iterator(); while(rri.hasNext()){ op = (CIMObjectPath)rri.next(); try{ dnsHintZone = (DNSHintZone) DNSHintZone.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsHintZone01 failed: " + e.getMessage()); } try{ name = dnsHintZone.getName(); type = dnsHintZone.getType(); typestr = dnsHintZone.getTypeString(); rr = dnsHintZone.getResourceRecordFile(); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsHintZone01 failed: " + e.getMessage()); } System.out.println("_________________________"); System.out.println("Name: " + name); System.out.println("Type: " + type + " -> " + typestr); System.out.println("ResourceRecord: " + rr); } System.out.println("_________________________"); System.out.println("testSingleDnsHintZone01 completed. Got " + arraylist.size()+ " DnsHintZones instances"); } } --- NEW FILE: DNSTest_DnsSetting_associations.java --- /** * DNSTest_DnsSetting_associations.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Jun 18, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMException; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSConfiguration; import org.sblim.wbemsmt.dns.bl.fco.DNSService; import org.sblim.wbemsmt.dns.bl.fco.DNSSetting; /** * Author ceron * */ public class DNSTest_DnsSetting_associations extends DNSTest_BaseClass { public DNSTest_DnsSetting_associations(String arg0){ super(arg0); } public void testAssociationsDnsSetting01(){ ArrayList arraylist = null; ArrayList arraylist2 = null; Iterator settingI = null; Iterator serviceI = null; DNSSetting setting = null; CIMObjectPath op = null; CIMObjectPath service = null; System.out.println("TEST: get dns service from setting association"); try{ arraylist = DNSSetting.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting01 failed: " + e.getMessage()); } settingI = arraylist.iterator(); while(settingI.hasNext()){ op = (CIMObjectPath) settingI.next(); System.out.println("Dns Setting object path: " + op); try{ setting = (DNSSetting) DNSSetting.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting01 failed: " + e.getMessage()); } try{ arraylist2 = setting.getAssociatedDnsServiceNames(this.cimClient); } catch (CIMException e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting01 failed: " + e.getMessage()); } serviceI = arraylist2.iterator(); while(serviceI.hasNext()){ service = (CIMObjectPath) serviceI.next(); System.out.println("Associated Dns Service: " + service); } System.out.println(); } System.out.println("testAssociationsDnsSetting01 completed."); } public void testAssociationsDnsSetting02(){ ArrayList arraylist = null; ArrayList arraylist2 = null; Iterator settingI = null; Iterator serviceI = null; DNSSetting setting = null; CIMObjectPath op = null; DNSService service = null; System.out.println("TEST: get Dns service instance from setting association"); try{ arraylist = DNSSetting.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting02 failed: " + e.getMessage()); } settingI = arraylist.iterator(); while(settingI.hasNext()){ op = (CIMObjectPath) settingI.next(); System.out.println("Dns Setting object path: " + op); try{ setting = (DNSSetting) DNSSetting.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting02 failed: " + e.getMessage()); } try{ arraylist2 = setting.getAssociatedDnsServices(this.cimClient); } catch (CIMException e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting02 failed: " + e.getMessage()); } serviceI = arraylist2.iterator(); while(serviceI.hasNext()){ service = (DNSService) serviceI.next(); System.out.println("Associated Dns Service:\n" + service +"\n________"); } System.out.println(); } System.out.println("testAssociationsDnsSetting02 completed."); } public void testAssociationsDnsSetting03(){ ArrayList arraylist = null; ArrayList arraylist2 = null; Iterator settingI = null; Iterator confI = null; DNSSetting setting = null; CIMObjectPath op = null; CIMObjectPath conf = null; System.out.println("TEST: get dns configuration from setting association"); try{ arraylist = DNSSetting.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting03 failed: " + e.getMessage()); } settingI = arraylist.iterator(); while(settingI.hasNext()){ op = (CIMObjectPath) settingI.next(); System.out.println("Dns Setting object path: " + op); try{ setting = (DNSSetting) DNSSetting.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting03 failed: " + e.getMessage()); } try{ arraylist2 = setting.getAssociatedDnsConfigurationNames(this.cimClient); } catch (CIMException e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting03 failed: " + e.getMessage()); } confI = arraylist2.iterator(); while(confI.hasNext()){ conf = (CIMObjectPath) confI.next(); System.out.println("Associated Dns Configuration: " + conf); } System.out.println(); } System.out.println("testAssociationsDnsSetting03 completed."); } public void testAssociationsDnsSetting04(){ ArrayList arraylist = null; ArrayList arraylist2 = null; Iterator settingI = null; Iterator confI = null; DNSSetting setting = null; CIMObjectPath op = null; DNSConfiguration conf = null; System.out.println("TEST: get Dns configuration instance from setting association"); try{ arraylist = DNSSetting.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting04 failed: " + e.getMessage()); } settingI = arraylist.iterator(); while(settingI.hasNext()){ op = (CIMObjectPath) settingI.next(); System.out.println("Dns Setting object path: " + op); try{ setting = (DNSSetting) DNSSetting.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting04 failed: " + e.getMessage()); } try{ arraylist2 = setting.getAssociatedDnsConfigurations(this.cimClient); } catch (CIMException e){ e.printStackTrace(); Assert.fail("testAssociationsDnsSetting04 failed: " + e.getMessage()); } confI = arraylist2.iterator(); while(confI.hasNext()){ conf = (DNSConfiguration) confI.next(); System.out.println("Associated Dns Configuration:\n" + conf +"\n________"); } System.out.println(); } System.out.println("testAssociationsDnsSetting04 completed."); } } --- NEW FILE: DNSTest_DnsConfiguration_getall.java --- /** * DNSTest_DnsConfiguration_getall.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Jun 18, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSConfiguration; ; /** * Author ceron * */ public class DNSTest_DnsConfiguration_getall extends DNSTest_BaseClass { /**The objective of this test is to test the get* methods from * DNSConfiguration * @param arg0 */ public DNSTest_DnsConfiguration_getall(String arg0){ super(arg0); } public void testSingleDnsConfiguration01(){ ArrayList arraylist = null; Iterator rri = null; DNSConfiguration conf = null; CIMObjectPath op = null; String name = null; String confFile = null; try{ arraylist = DNSConfiguration.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsConfiguration01 failed: " + e.getMessage()); } rri = arraylist.iterator(); while(rri.hasNext()){ op = (CIMObjectPath)rri.next(); try{ conf = (DNSConfiguration) DNSConfiguration.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsConfiguration01 failed: " + e.getMessage()); } try{ name = conf.getName(); confFile = conf.getConfFile(); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsConfiguration01 failed: " + e.getMessage()); } System.out.println("_________________________"); System.out.println("Name: " + name); System.out.println("Config file: " + confFile); } System.out.println("_________________________"); System.out.println("testSingleDnsConfiguration01 completed. Got " + arraylist.size()+ " dns configuration instances"); } } --- NEW FILE: DNSTest_DnsMasterZone_print.java --- /** * DNSTest_DnsMasterZone_print.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 21, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import junit.framework.Assert; import org.sblim.wbemsmt.dns.bl.fco.DNSMasterZone; /** * Author ceron * */ public class DNSTest_DnsMasterZone_print extends DNSTest_BaseClass{ /** * Constructor for DNSTest. * @param arg0 */ public DNSTest_DnsMasterZone_print(String arg0) { super(arg0); } public void testPrintDnsMasterZone01() { try { ArrayList dnsMasterZoneList = DNSMasterZone.enumerateInstanceNames(cimClient); System.out.println("______________________________"); for (int i=0; dnsMasterZoneList != null && i < dnsMasterZoneList.size(); i++) { System.out.println(dnsMasterZoneList.get(i)); } System.out.println("_______________________________"); System.out.println("testPrintDnsMasterZone01 completed. Printed " + dnsMasterZoneList.size() + " DnsMasterZone ObjectPath entries."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsMasterZone01 failed: " + e.getMessage()); } } public void testPrintDnsMasterZone02() { try { ArrayList dnsMasterZoneList = DNSMasterZone.enumerateInstances(this.cimClient); for (int i=0; dnsMasterZoneList != null && i < dnsMasterZoneList.size(); i++) { System.out.println("_____________________________"); System.out.println(dnsMasterZoneList.get(i)); } System.out.println("testPrintDnsMasterZone02 completed. Printed " + dnsMasterZoneList.size() + " DnsMasterZone Instances."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsMasterZone02 failed: " + e.getMessage()); } } } --- NEW FILE: DNSTest_DnsAML_list.java --- /** * DNSTest_DnsAML_list.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 26, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import junit.framework.Assert; import org.sblim.wbemsmt.dns.bl.fco.DNSAddressMatchList; /** * Author ceron * */ public class DNSTest_DnsAML_list extends DNSTest_BaseClass { /** * Constructor for DNSTest. * @param arg0 */ public DNSTest_DnsAML_list(String arg0) { super(arg0); } public void testListDnsAML01() { try { ArrayList amlList = DNSAddressMatchList.enumerateInstanceNames(cimClient); System.out.println("testListDnsAML01 completed. Got " + amlList.size() + " address match list ObjectPath entries."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testListDnsAML01 failed: " + e.getMessage()); } } public void testListDnsAML02() { try { DNSAddressMatchList.enumerateInstanceNames(null); Assert.fail("testListDnsAML02 failed"); } catch (NullPointerException e) { System.out.println("testListDnsAML02 completed. Got NullPointerException as expected."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testListDnsAML02 failed: " + e.getMessage()); } } public void testListDnsAML03() { try { ArrayList amlList = DNSAddressMatchList.enumerateInstances(this.cimClient); System.out.println("testListDnsAML03 completed. Got " + amlList.size() + " address match list Instances."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testListDnsAML03 failed: " + e.getMessage()); } } public void testListDnsAML04() { try { DNSAddressMatchList.enumerateInstances(null); Assert.fail("testListDnsAML04 failed"); } catch (NullPointerException e) { System.out.println("testListDnsAML04 completed. Got NullPointerException as expected."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testListDnsAML04 failed: " + e.getMessage()); } } } --- NEW FILE: DNSTest_DnsSlaveZone_getall.java --- /** * DNSTest_DnsSlaveZone_getall.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 21, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSSlaveZone; /**he objective of this test is to test the get* methods from * DNSSlaveZone * Author ceron * */ public class DNSTest_DnsSlaveZone_getall extends DNSTest_BaseClass { /**The objective of this test is to test the get* methods from * DNSSlaveZone * @param arg0 */ public DNSTest_DnsSlaveZone_getall(String arg0){ super(arg0); } public void testSingleDnsSlaveZone01(){ ArrayList arraylist = null; Iterator rri = null; DNSSlaveZone dnsSlaveZone = null; CIMObjectPath op = null; String name = null; Short type = null; String typestr = null; String rr = null; String forwardString = null; Short forward = null; Object forwarders[] = null; try{ arraylist = DNSSlaveZone.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsSlaveZone01 failed: " + e.getMessage()); } rri = arraylist.iterator(); while(rri.hasNext()){ op = (CIMObjectPath)rri.next(); try{ dnsSlaveZone = (DNSSlaveZone) DNSSlaveZone.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsSlaveZone01 failed: " + e.getMessage()); } try{ name = dnsSlaveZone.getName(); type = dnsSlaveZone.getType(); typestr = dnsSlaveZone.getTypeString(); rr = dnsSlaveZone.getResourceRecordFile(); forwardString = dnsSlaveZone.getForwardString(); forward = dnsSlaveZone.getForward(); forwarders = dnsSlaveZone.getForwarders(); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsSlaveZone01 failed: " + e.getMessage()); } System.out.println("_________________________"); System.out.println("Name: " + name); System.out.println("Type: " + type + " -> " + typestr); System.out.println("ResourceRecord: " + rr); System.out.println("Forward: " + forward + " -> " + forwardString); System.out.println("Forwarders:"); for(int i=0; i < forwarders.length; i++) System.out.println(" "+ forwarders[i]); } System.out.println("_________________________"); System.out.println("testSingleDnsSlaveZone01 completed. Got " + arraylist.size()+ " DnsSlaveZones instances"); } } --- NEW FILE: DNSTest_DnsHintZone_print.java --- /** * DNSTest_DnsHintZone_print.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on May 21, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import junit.framework.Assert; import org.sblim.wbemsmt.dns.bl.fco.DNSHintZone; /** * Author ceron * */ public class DNSTest_DnsHintZone_print extends DNSTest_BaseClass { /** * Constructor for DNSTest. * @param arg0 */ public DNSTest_DnsHintZone_print(String arg0) { super(arg0); } public void testPrintDnsHintZone01() { try { ArrayList dnsHintZoneList = DNSHintZone.enumerateInstanceNames(cimClient); System.out.println("______________________________"); for (int i=0; dnsHintZoneList != null && i < dnsHintZoneList.size(); i++) { System.out.println(dnsHintZoneList.get(i)); } System.out.println("_______________________________"); System.out.println("testPrintDnsHintZone01 completed. Printed " + dnsHintZoneList.size() + " DnsHintZone ObjectPath entries."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsHintZone01 failed: " + e.getMessage()); } } public void testPrintDnsHintZone02() { try { ArrayList dnsHintZoneList = DNSHintZone.enumerateInstances(this.cimClient); for (int i=0; dnsHintZoneList != null && i < dnsHintZoneList.size(); i++) { System.out.println("_____________________________"); System.out.println(dnsHintZoneList.get(i)); } System.out.println("testPrintDnsHintZone02 completed. Printed " + dnsHintZoneList.size() + " DnsHintZone Instances."); } catch (Exception e) { e.printStackTrace(); Assert.fail("testPrintDnsHintZone02 failed: " + e.getMessage()); } } } --- NEW FILE: DNSTest_DnsForwardZone_delete.java --- /** * DNSTest_DnsForwardZone_delete.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Jun 14, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSForwardZone; import org.sblim.wbemsmt.exception.InvalidParameterException; /** * Author ceron * */ public class DNSTest_DnsForwardZone_delete extends DNSTest_BaseClass { public DNSTest_DnsForwardZone_delete(String arg0){ super(arg0); } public void testDeleteDnsForwardZone01(){ DNSForwardZone zone = null; ArrayList a = DNSForwardZone.enumerateInstanceNames(this.cimClient); Iterator i = a.iterator(); CIMObjectPath op = null; try{ while(i.hasNext()){ op = (CIMObjectPath) i.next(); zone = (DNSForwardZone) DNSForwardZone.getInstance(this.cimClient,op); if("GhostFwZone".equals(zone.getName())){ DNSForwardZone.deleteInstance(this.cimClient,zone); } } }catch (Exception e){ e.printStackTrace(); Assert.fail("testDeleteDnsForwardZone01 failed: " + e.getMessage()); } System.out.println("testDeleteDnsForwardZone01: completed"); } public void testDeleteDnsForwardZone02(){ DNSForwardZone zone = null; try{ DNSForwardZone.deleteInstance(this.cimClient,zone); }catch (InvalidParameterException e){ System.out.println("testDeleteDnsForwardZone02: Got InvalidParameterException as expected"); }catch (Exception e){ e.printStackTrace(); Assert.fail("testDeleteDnsForward02 failed: " + e.getMessage()); } } } --- NEW FILE: DNSTest_DnsService_getall.java --- /** * DNSTest_DnsService_getall.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Jun 17, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import java.util.Iterator; import junit.framework.Assert; import org.sblim.wbem.cim.CIMObjectPath; import org.sblim.wbemsmt.dns.bl.fco.DNSService; /** * Author ceron * */ public class DNSTest_DnsService_getall extends DNSTest_BaseClass { /**The objective of this test is to test the get* methods from * DNSService * @param arg0 */ public DNSTest_DnsService_getall(String arg0){ super(arg0); } public void testSingleDnsService01(){ ArrayList arraylist = null; Iterator rri = null; DNSService service = null; CIMObjectPath op = null; String name = null; try{ arraylist = DNSService.enumerateInstanceNames(this.cimClient); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsService01 failed: " + e.getMessage()); } rri = arraylist.iterator(); while(rri.hasNext()){ op = (CIMObjectPath)rri.next(); try{ service = (DNSService) DNSService.getInstance(this.cimClient,op); }catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsService01 failed: " + e.getMessage()); } try{ name = service.getName(); } catch (Exception e){ e.printStackTrace(); Assert.fail("testSingleDnsService01 failed: " + e.getMessage()); } System.out.println("_________________________"); System.out.println("Name: " + name); } System.out.println("_________________________"); System.out.println("testSingleDnsService01 completed. Got " + arraylist.size()+ " dns service instances"); } } --- NEW FILE: DNSTest_DnsConfiguration_list.java --- /** * DNSTest_DnsConfiguration_list.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Jun 18, 2005, ceron */ package org.sblim.wbemsmt.dns.test; import java.util.ArrayList; import junit.framework.Assert; import org.sblim.wbemsmt.dns.bl.fco.DNSConfiguration; /** * Author ceron * */ public class DNSTest_DnsConfiguration_list extends DNSTest_BaseClass { /** * Constructor for DNSTest. * @param arg0 */ public DNSTest_DnsConfiguration_list(String arg0) { super(arg0); } public void testListDnsConfiguration01() { try { ArrayList confList = DNSConfiguration.enumerateInstanceNames(cimClient); System.out.println("testListDnsService01 completed. Got ... [truncated message content] |