Package siena.base.test.model

Examples of siena.base.test.model.EmbeddedNative


    }
    assertEquals(embed.isGamma(), afterContainer.embed.isGamma());
  }
 
  public void testEmbeddedNative() {
    EmbeddedNative embed = new EmbeddedNative();
    embed.alpha = "test";
    embed.beta = 123;
    embed.setGamma(true);
    embed.delta = 456L;
    embed.eta = new ArrayList<String>() {{ add("one"); add("two"); }};
    embed.myEnum = MyEnum.ONE;
    embed.big = new BigDecimal("12345678.12345678");
    embed.jsonEmbed = new EmbeddedNative.SubEmbed();
    embed.jsonEmbed.str = "test";
    embed.jsonEmbed.l = 123L;
    embed.javaEmbed = new EmbeddedNative.SubEmbed();
    embed.javaEmbed.str = "test";
    embed.javaEmbed.l = 123L;
    embed.nativeEmbed = new EmbeddedNative.SubEmbed();
    embed.nativeEmbed.str = "test";
    embed.nativeEmbed.l = 123L;
   
    EmbeddedContainerNative container = new EmbeddedContainerNative();
    container.id = "container";
    container.normal = "string";
    container.embed = embed;
    pm.save(container);
   
    EmbeddedContainerNative afterContainer = Model.getByKey(EmbeddedContainerNative.class, container.id);
    assertNotNull(afterContainer);
    assertEquals(container.id, afterContainer.id);
    assertEquals(container.normal, afterContainer.normal);
    assertNotNull(afterContainer.embed);
    assertEquals(embed.alpha, afterContainer.embed.alpha);
    assertEquals(embed.beta, afterContainer.embed.beta);
    assertEquals(embed.isGamma(), afterContainer.embed.isGamma());
    assertEquals(embed.myEnum, afterContainer.embed.myEnum);
    assertEquals(embed.big, afterContainer.embed.big);
    assertEquals(embed.jsonEmbed.str, afterContainer.embed.jsonEmbed.str);
    assertEquals(embed.jsonEmbed.l, afterContainer.embed.jsonEmbed.l);
    assertEquals(embed.javaEmbed.str, afterContainer.embed.javaEmbed.str);
View Full Code Here


  }
 
  public void testEmbeddedNativeFilter() {
    List<EmbeddedContainerNative> containers = new ArrayList<EmbeddedContainerNative>();
    for(int i=0; i<100; i++){
      EmbeddedNative embed = new EmbeddedNative();
      embed.alpha = "test"+i;
      embed.beta = 123;
      embed.setGamma(true);
      embed.delta = 456L;
      embed.eta = new ArrayList<String>() {{ add("one"); add("two"); }};
      embed.myEnum = MyEnum.ONE;
      embed.big = new BigDecimal("12345678.12345678");
      embed.jsonEmbed = new EmbeddedNative.SubEmbed();
View Full Code Here

TOP

Related Classes of siena.base.test.model.EmbeddedNative

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.