Package com.vaadin.data.util.filter

Examples of com.vaadin.data.util.filter.Like


        Assert.assertTrue(like.passesFilter("id", item));
    }

    @Test
    public void appliesToProperty_valueIsProperty_shouldBeTrue() {
        Like like = new Like("test", "%foo");
        Assert.assertTrue(like.appliesToProperty("test"));
    }
View Full Code Here


        Assert.assertTrue(like.appliesToProperty("test"));
    }

    @Test
    public void appliesToProperty_valueIsNotProperty_shouldBeFalse() {
        Like like = new Like("test", "%foo");
        Assert.assertFalse(like.appliesToProperty("bar"));
    }
View Full Code Here

        Assert.assertFalse(like.appliesToProperty("bar"));
    }

    @Test
    public void equals_sameInstances_shouldBeTrue() {
        Like like1 = new Like("test", "%foo");
        Like like2 = like1;
        Assert.assertTrue(like1.equals(like2));
    }
View Full Code Here

        Assert.assertTrue(like1.equals(like2));
    }

    @Test
    public void equals_twoEqualInstances_shouldBeTrue() {
        Like like1 = new Like("test", "foo");
        Like like2 = new Like("test", "foo");
        Assert.assertTrue(like1.equals(like2));
    }
View Full Code Here

        Assert.assertTrue(like1.equals(like2));
    }

    @Test
    public void equals_differentValues_shouldBeFalse() {
        Like like1 = new Like("test", "foo");
        Like like2 = new Like("test", "bar");
        Assert.assertFalse(like1.equals(like2));
    }
View Full Code Here

        Assert.assertFalse(like1.equals(like2));
    }

    @Test
    public void equals_differentProperties_shouldBeFalse() {
        Like like1 = new Like("foo", "test");
        Like like2 = new Like("bar", "test");
        Assert.assertFalse(like1.equals(like2));
    }
View Full Code Here

        Assert.assertFalse(like1.equals(like2));
    }

    @Test
    public void equals_differentPropertiesAndValues_shouldBeFalse() {
        Like like1 = new Like("foo", "bar");
        Like like2 = new Like("baz", "zomg");
        Assert.assertFalse(like1.equals(like2));
    }
View Full Code Here

        Assert.assertFalse(like1.equals(like2));
    }

    @Test
    public void equals_differentClasses_shouldBeFalse() {
        Like like1 = new Like("foo", "bar");
        Object obj = new Object();
        Assert.assertFalse(like1.equals(obj));
    }
View Full Code Here

        Assert.assertFalse(like1.equals(obj));
    }

    @Test
    public void equals_bothHaveNullProperties_shouldBeTrue() {
        Like like1 = new Like(null, "foo");
        Like like2 = new Like(null, "foo");
        Assert.assertTrue(like1.equals(like2));
    }
View Full Code Here

        Assert.assertTrue(like1.equals(like2));
    }

    @Test
    public void equals_bothHaveNullValues_shouldBeTrue() {
        Like like1 = new Like("foo", null);
        Like like2 = new Like("foo", null);
        Assert.assertTrue(like1.equals(like2));
    }
View Full Code Here

TOP

Related Classes of com.vaadin.data.util.filter.Like

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.