Examples of Hoge


Examples of org.slim3.datastore.model.Hoge

    /**
     * @throws Exception
     */
    @Test
    public void accept() throws Exception {
        Hoge hoge = new Hoge();
        hoge.setMyString("aaa");
        InMemoryInCriterion c =
            new InMemoryInCriterion(meta.myString, Arrays.asList("aaa"));
        assertThat(c.accept(hoge), is(true));
        hoge.setMyString("bbb");
        assertThat(c.accept(hoge), is(false));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    @Test
    public void acceptForEnum() throws Exception {
        InMemoryInCriterion c =
            new InMemoryInCriterion(meta.myEnum, Arrays
                .asList(SortDirection.ASCENDING));
        Hoge hoge = new Hoge();
        hoge.setMyEnum(SortDirection.DESCENDING);
        assertThat(c.accept(hoge), is(false));
        hoge.setMyEnum(SortDirection.ASCENDING);
        assertThat(c.accept(hoge), is(true));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    /**
     * @throws Exception
     */
    @Test
    public void accept() throws Exception {
        Hoge hoge = new Hoge();
        hoge.setMyString("c");
        InMemoryGreaterThanCriterion c =
            new InMemoryGreaterThanCriterion(meta.myString, "b");
        assertThat(c.accept(hoge), is(true));
        hoge.setMyString("b");
        assertThat(c.accept(hoge), is(false));
        hoge.setMyString("a");
        assertThat(c.accept(hoge), is(false));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    public void acceptForEnum() throws Exception {
        InMemoryGreaterThanCriterion c =
            new InMemoryGreaterThanCriterion(
                meta.myEnum,
                SortDirection.ASCENDING);
        Hoge hoge = new Hoge();
        assertThat(c.accept(hoge), is(false));
        hoge.setMyEnum(SortDirection.DESCENDING);
        assertThat(c.accept(hoge), is(true));
        hoge.setMyEnum(SortDirection.ASCENDING);
        assertThat(c.accept(hoge), is(false));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    /**
     * @throws Exception
     */
    @Test
    public void acceptForNull() throws Exception {
        Hoge hoge = new Hoge();
        hoge.setMyString("c");
        InMemoryGreaterThanCriterion c =
            new InMemoryGreaterThanCriterion(meta.myString, null);
        assertThat(c.accept(hoge), is(true));
        hoge.setMyString(null);
        assertThat(c.accept(hoge), is(false));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    /**
     * @throws Exception
     */
    @Test
    public void acceptForCollection() throws Exception {
        Hoge hoge = new Hoge();
        hoge.setMyIntegerList(Arrays.asList(1));
        InMemoryGreaterThanCriterion c =
            new InMemoryGreaterThanCriterion(meta.myIntegerList, 1);
        assertThat(c.accept(hoge), is(false));
        hoge.setMyIntegerList(Arrays.asList(2));
        assertThat(c.accept(hoge), is(true));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    public void primitiveShort() throws Exception {
        model.setMyPrimitiveShort((short) 1);
        Entity entity = meta.modelToEntity(model);
        Key key = ds.put(entity);
        Entity entity2 = ds.get(key);
        Hoge model2 = meta.entityToModel(entity2);
        assertThat(model2.getMyPrimitiveShort(), is((short) 1));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    public void shortWrapper() throws Exception {
        model.setMyShort((short) 1);
        Entity entity = meta.modelToEntity(model);
        Key key = ds.put(entity);
        Entity entity2 = ds.get(key);
        Hoge model2 = meta.entityToModel(entity2);
        assertThat(model2.getMyShort(), is((short) 1));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    public void primitiveInt() throws Exception {
        model.setMyPrimitiveInt(1);
        Entity entity = meta.modelToEntity(model);
        Key key = ds.put(entity);
        Entity entity2 = ds.get(key);
        Hoge model2 = meta.entityToModel(entity2);
        assertThat(model2.getMyPrimitiveInt(), is(1));
    }
View Full Code Here

Examples of org.slim3.datastore.model.Hoge

    public void integer() throws Exception {
        model.setMyInteger(1);
        Entity entity = meta.modelToEntity(model);
        Key key = ds.put(entity);
        Entity entity2 = ds.get(key);
        Hoge model2 = meta.entityToModel(entity2);
        assertThat(model2.getMyInteger(), is(1));
    }
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.