Package org.apache.juddi.v3.client.compare

Examples of org.apache.juddi.v3.client.compare.TModelInstanceDetailsComparator.compare()


        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);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToRHSNull() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToRHSNull");
View Full Code Here


        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);
    }

    @Test(expected = NumberFormatException.class)
    public void testCompareToNotNumberData() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToNotNumberData");
View Full Code Here

        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);
    }

    @Test
    public void testCompareToNumberDataEquals() throws DatatypeConfigurationException {
        System.out.println("TModelInstanceDetailsComparator.compare testCompareToNumberDataEquals");
View Full Code Here

        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);
    }

    @Test
    public void testCompareToNumberDataGT() throws DatatypeConfigurationException {
View Full Code Here

        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);
    }

    @Test
    public void testCompareToNumberDataLT() throws DatatypeConfigurationException {
View Full Code Here

        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);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testCompareToDate() throws DatatypeConfigurationException {
View Full Code Here

        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);

    }

    @Test
View Full Code Here

        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

        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

        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

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.