Package org.thechiselgroup.choosel.core.client.resources

Examples of org.thechiselgroup.choosel.core.client.resources.Resource


    private DefaultDropTargetCapabilityChecker underTest;

    @Test
    public void dropNotPossibleIfRequiredDatePropertyNotAvailable() {
        ResourceSet resourceSet = new DefaultResourceSet();
        Resource resource = new Resource("test:1");
        resource.putValue("key1", "stringValue");
        resourceSet.add(resource);

        Slot[] slots = new Slot[] { new Slot("1", "slot1", DataType.DATE) };

        assertEquals(false, underTest.isValidDrop(slots, resourceSet));
View Full Code Here


    }

    @Test
    public void dropPossibleIfRequiredDatePropertyAvailable() {
        ResourceSet resourceSet = new DefaultResourceSet();
        Resource resource = new Resource("test:1");
        resource.putValue("key1", new Date());
        resourceSet.add(resource);

        Slot[] slots = new Slot[] { new Slot("1", "slot1", DataType.DATE) };

        assertEquals(true, underTest.isValidDrop(slots, resourceSet));
View Full Code Here

    @Test
    public void dropPossibleIfRequiredLocationPropertyAvailable() {
        ResourceSet resourceSet = new DefaultResourceSet();

        Resource locationResource = new Resource("location:2");
        locationResource.putValue(ResourceSetUtils.LONGITUDE, 0d);
        locationResource.putValue(ResourceSetUtils.LATITUDE, 0d);

        Resource resource = new Resource("test:1");
        resource.putValue("key1", locationResource);
        resourceSet.add(resource);

        Slot[] slots = new Slot[] { new Slot("1", "slot1", DataType.LOCATION) };

        assertEquals(true, underTest.isValidDrop(slots, resourceSet));
View Full Code Here

TOP

Related Classes of org.thechiselgroup.choosel.core.client.resources.Resource

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.