Examples of Child


Examples of com.google.appengine.tools.mapreduce.testModels.Child

  public void testGeneratedJsonForRepeatedNestedRecord() {
    BigQueryDataMarshallerTester<Father> tester = new BigQueryDataMarshallerTester<Father>(
        new BigQueryMarshallerByType<Father>(Father.class));

    tester.testGeneratedJson(
        "{\"married\":true,\"name\":\"Messi\",\"sons\":[{\"fullName\":\"Ronaldo\",\"age\":28},{\"fullName\":\"Rooney\",\"age\":29}]}", new Father(true, "Messi", Lists.newArrayList(new Child("Ronaldo", 28), new Child("Rooney", 29))));
  }
View Full Code Here

Examples of com.googlecode.objectify.test.LoadParentRefTests.Child

    Father f = new Father();
    f.foo = "foo";
    ofy().save().entity(f).now();

    Child ch = new Child();
    ch.father = Ref.create(Key.create(f));
    ch.bar = "bar";
    Key<Child> kch = ofy().save().entity(ch).now();

    LoadResult<Child> fetchedRef = ofy().load().key(kch);
    Child fetched = fetchedRef.now();

    assert fetched.bar.equals(ch.bar);
    assert fetched.father.get().id.equals(f.id);
    assert fetched.father.get().foo.equals(f.foo);
  }
View Full Code Here

Examples of com.googlecode.objectify.test.entity.Child

    fact().register(Child.class);

    Trivial triv = new Trivial(null, 3);
    Key<Trivial> trivKey = ofy().save().entity(triv).now();

    Child child = new Child(trivKey, "blah");
    ofy().save().entity(child).now();

    Iterator<Object> it = ofy().load().ancestor(trivKey).iterator();

    Object fetchedTrivial = it.next();
    assert fetchedTrivial instanceof Trivial;
    assert ((Trivial)fetchedTrivial).getId().equals(triv.getId());

    Object fetchedChild = it.next();
    assert fetchedChild instanceof Child;
    assert ((Child)fetchedChild).getId().equals(child.getId());

    assert !it.hasNext();
  }
View Full Code Here

Examples of com.googlecode.objectify.test.entity.Child

    fact().register(Child.class);

    Trivial triv = new Trivial("foo", 5);
    Key<Trivial> parentKey = ofy().save().entity(triv).now();

    Child child = new Child(parentKey, "cry");
    Key<Child> childKey = ofy().save().entity(child).now();

    assert childKey.getParent().equals(parentKey);

    Child fetched = ofy().load().key(childKey).now();

    assert fetched.getParent().equals(child.getParent());
    assert fetched.getChildString().equals(child.getChildString());

    // Let's make sure we can get it back from an ancestor query
    Child queried = ofy().load().type(Child.class).ancestor(parentKey).first().now();

    assert queried.getParent().equals(child.getParent());
    assert queried.getChildString().equals(child.getChildString());
  }
View Full Code Here

Examples of com.orientechnologies.orient.test.domain.business.Child

  @Test()
  public void testSetFieldSize() {
    JavaComplexTestClass test = database.newInstance(JavaComplexTestClass.class);
    for (int i = 0; i < 100; i++) {
      Child child = database.newInstance(Child.class);
      child.setName(String.valueOf(i));
      test.getSet().add(child);
    }
    Assert.assertNotNull(test.getSet());
    Assert.assertEquals(test.getSet().size(), 100);
    database.save(test);
    // Assert.assertEquals(test.getSet().size(), 100);
    ORID rid = database.getIdentity(test);
    database.close();
    database = OObjectDatabasePool.global().acquire(url, "admin", "admin");

    test = database.load(rid);
    Assert.assertNotNull(test.getSet());
    Iterator<Child> it = test.getSet().iterator();
    while (it.hasNext()) {
      Child child = it.next();
      Assert.assertNotNull(child.getName());
      Assert.assertTrue(Integer.valueOf(child.getName()) < 100);
      Assert.assertTrue(Integer.valueOf(child.getName()) >= 0);
    }
    Assert.assertEquals(test.getSet().size(), 100);
    database.delete(test);
  }
View Full Code Here

Examples of com.sishuok.es.showcase.parentchild.entity.Child

        this.permissionList.assertHasEditPermission();

        setCommonData(model);
        model.addAttribute(Constants.OP_NAME, "新增");
        if (!model.containsAttribute("child")) {
            model.addAttribute("child", new Child());
        }
        return "showcase/parentchild/child/editForm";
    }
View Full Code Here

Examples of electric.xml.Child

    private String getStringValue(Element e)
    {
        StringBuffer buf = new StringBuffer();

        Children children = e.getChildren();
        Child    eachChild = null;

        while ( ( eachChild = children.next() ) != null )
        {
            if ( eachChild instanceof Element )
            {
View Full Code Here

Examples of es.upm.dit.gsi.eclipse.jadex.navigator.Child

    }
    return null;           
  }
 
  private IFile getSelectedAgentFile(){
    Child selChild = getSelectedChild();
    if(selChild != null){
      return selChild.getContainer();
    }
    return null;
  }
View Full Code Here

Examples of haikuvm.bench.from.darjeeling.testvm.classes.Child


public class BitManipulationTest {
  public static void test(int testBase)
  {
    Child child = new Child(new byte[4]);
    for (int i = 0; i < 10; i ++){
      for (int j = 0; j < child.getBytes().length; j ++)
      child.setCongested(true);
      child.getBytes()[0] = 0;
      Darjeeling.assertTrue(testBase + i*4, child.getCongested());
      child.setCongested(false);
      Darjeeling.assertTrue(testBase + i*4 + 1, !child.getCongested());
      child.setRoutingPull(true);
      Darjeeling.assertTrue(testBase + i*4 + 2, child.getRoutingPull());
      child.setRoutingPull(false);
      Darjeeling.assertTrue(testBase + i*4 + 3, !child.getRoutingPull());
    }
  }
View Full Code Here

Examples of hivemind.test.config.impl.Child

        assertEquals("value1", p1.getValue());

        l = p1.getChildren();
        assertEquals(2, l.size());

        Child c1 = (Child) l.get(0);

        assertSame(p1, c1.getParent());

        assertEquals("detailkey1", c1.getKey());
        assertEquals("detailvalue1", c1.getValue());

        Child c2 = (Child) l.get(1);

        assertSame(p1, c2.getParent());

        assertEquals("detailkey2", c2.getKey());
        assertEquals("detailvalue2", c2.getValue());
    }
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.