Package org.uddi.api_v2

Examples of org.uddi.api_v2.TModelInstanceDetails


    }

    @Test(expected = NumberFormatException.class)
    public void testCompareToNotNumberData() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToNotNumberData");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("xyz");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("xyz");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
    }
View Full Code Here


    }

    @Test
    public void testCompareToNumberDataEquals() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToNumberDataEquals");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("3.14");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("3.14");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
        int expResult = 0;
        int result = instance.compare(lhs, rhs);
        Assert.assertEquals("result " + result, expResult, result);
    }
View Full Code Here

    }

    @Test
    public void testCompareToNumberDataGT() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToNumberDataGT");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("3.15");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("3.14");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);

        int result = instance.compare(lhs, rhs);
        Assert.assertTrue("result " + result, result > 0);
    }
View Full Code Here

    }

    @Test
    public void testCompareToNumberDataLT() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToNumberDataLT");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("3.10");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("3.14");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);

        int result = instance.compare(lhs, rhs);
        Assert.assertTrue("result " + result, result < 0);
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToDate() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToDate");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("asdasd");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("asdasdasd");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);

        int result = instance.compare(lhs, rhs);
        //Assert.assertTrue("result " + result,result < 0);
View Full Code Here

    }

    @Test
    public void testCompareToDateGT() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToDateGT");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("2006-05-30T09:30:10-06:00");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("2004-05-30T09:30:10-06:00");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);

        int result = instance.compare(lhs, rhs);
        Assert.assertTrue("result " + lhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " compare to " +
                rhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " " +
                result, result > 0);

    }
View Full Code Here

    }

    @Test
    public void testCompareToDateLT() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToDateLT");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("2002-05-30T09:30:10-06:00");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("2005-05-30T09:30:10-06:00");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);

        int result = instance.compare(lhs, rhs);
        Assert.assertTrue("result " + lhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " compare to " +
                rhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " " +
                result, result < 0);

    }
View Full Code Here

    }

    @Test
    public void testCompareToDateEQ() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToDateEQ");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("2002-05-30T09:30:10-06:00");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("2002-05-30T09:30:10-06:00");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);

        int result = instance.compare(lhs, rhs);
        Assert.assertTrue("result " + lhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " compare to " +
                rhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " " +
                result, result == 0);

    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToDurationInvalid() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToDurationInvalid");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("asdasd");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("asdasd");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
        int result = instance.compare(lhs, rhs);
        Assert.assertTrue("result " + result, result == 0);
    }
View Full Code Here

    }

    @Test
    public void testCompareToDurationLT() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToDurationLT");
        TModelInstanceDetails lhs = new TModelInstanceDetails();
        lhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        lhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        lhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        lhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("P1Y");
        TModelInstanceDetails rhs = new TModelInstanceDetails();

        rhs.getTModelInstanceInfo().add(new TModelInstanceInfo());
        rhs.getTModelInstanceInfo().get(0).setTModelKey("hi");
        rhs.getTModelInstanceInfo().get(0).setInstanceDetails(new InstanceDetails());
        rhs.getTModelInstanceInfo().get(0).getInstanceDetails().setInstanceParms("P3Y");
        TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
        int result = instance.compare(lhs, rhs);
        Assert.assertTrue("result " + lhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " compare to " +
                rhs.getTModelInstanceInfo().get(0).getInstanceDetails().getInstanceParms() + " " +
                result, result < 0);
    }
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.TModelInstanceDetails

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.