Package siena.base.test.model

Examples of siena.base.test.model.DataTypes


    b.parent = a;
    pm.update(b);
  }
 
  public void testDataTypesNull() {
    DataTypes dataTypes = new DataTypes();
    pm.insert(dataTypes);
   
    assertEqualsDataTypes(dataTypes, pm.createQuery(DataTypes.class).get());
  }
View Full Code Here


 
  public void testDataTypesNotNull() {
    char[] c = new char[501];
    Arrays.fill(c, 'x');
   
    DataTypes dataTypes = new DataTypes();
    dataTypes.typeByte = 1;
    dataTypes.typeShort = 2;
    dataTypes.typeInt = 3;
    dataTypes.typeLong = 4;
    dataTypes.typeFloat = 5;
    dataTypes.typeDouble = 6;
    dataTypes.typeDate = new Date();
    dataTypes.typeString = "hello";
    dataTypes.typeLargeString = new String(c);
    dataTypes.typeJson = map().put("foo", "bar");
    dataTypes.addresses = new ArrayList<Address>();
    dataTypes.addresses.add(new Address("Castellana", "Madrid"));
    dataTypes.addresses.add(new Address("Diagonal", "Barcelona"));
    dataTypes.contacts = new HashMap<String, Contact>();
    dataTypes.contacts.put("id1", new Contact("Somebody", Arrays.asList("foo", "bar")));
   
    dataTypes.shortShort = Short.MAX_VALUE;
    dataTypes.intInt = Integer.MAX_VALUE;
    dataTypes.longLong = Long.MAX_VALUE;
    dataTypes.boolBool = Boolean.TRUE;
   
    // Blob
    dataTypes.typeBlob = new byte[] {
        (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x04,
        (byte)0x10(byte)0X11, (byte)0xF0, (byte)0xF1,
        (byte)0xF9(byte)0xFF };
   
    dataTypes.typeEnum = EnumLong.ALPHA;
   
    pm.insert(dataTypes);
   
    // to test that fields are read back correctly
    pm.createQuery(DataTypes.class).filter("id", dataTypes.id).get();
   
    DataTypes same = pm.createQuery(DataTypes.class).get();
    assertEqualsDataTypes(dataTypes, same);
  }
View Full Code Here

    b.parent = a;
    pm.update(b);
  }
 
  public void testDataTypesNull() {
    DataTypes dataTypes = new DataTypes();
    pm.insert(dataTypes).get();
   
    assertEqualsDataTypes(dataTypes, pm.createQuery(DataTypes.class).get().get());
  }
View Full Code Here

 
  public void testDataTypesNotNull() {
    char[] c = new char[501];
    Arrays.fill(c, 'x');
   
    DataTypes dataTypes = new DataTypes();
    dataTypes.typeByte = 1;
    dataTypes.typeShort = 2;
    dataTypes.typeInt = 3;
    dataTypes.typeLong = 4;
    dataTypes.typeFloat = 5;
View Full Code Here

    b.parent = a;
    pm.update(b);
  }
 
  public void testDataTypesNull() {
    DataTypes dataTypes = new DataTypes();
    pm.insert(dataTypes);
   
    assertEqualsDataTypes(dataTypes, pm.createQuery(DataTypes.class).get());
  }
View Full Code Here

 
  public void testDataTypesNotNull() {
    char[] c = new char[501];
    Arrays.fill(c, 'x');
   
    DataTypes dataTypes = new DataTypes();
    dataTypes.typeByte = 1;
    dataTypes.typeShort = 2;
    dataTypes.typeInt = 3;
    dataTypes.typeLong = 4;
    dataTypes.typeFloat = 5;
    dataTypes.typeDouble = 6;
    dataTypes.typeDate = new Date();
    dataTypes.typeString = "hello";
    dataTypes.typeLargeString = new String(c);
    dataTypes.typeJson = map().put("foo", "bar");
    dataTypes.addresses = new ArrayList<Address>();
    dataTypes.addresses.add(new Address("Castellana", "Madrid"));
    dataTypes.addresses.add(new Address("Diagonal", "Barcelona"));
    dataTypes.contacts = new HashMap<String, Contact>();
    dataTypes.contacts.put("id1", new Contact("Somebody", Arrays.asList("foo", "bar")));
   
    dataTypes.shortShort = Short.MAX_VALUE;
    dataTypes.intInt = Integer.MAX_VALUE;
    dataTypes.longLong = Long.MAX_VALUE;
    dataTypes.boolBool = Boolean.TRUE;
   
    // Blob
    dataTypes.typeBlob = new byte[] {
        (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x04,
        (byte)0x10(byte)0X11, (byte)0xF0, (byte)0xF1,
        (byte)0xF9(byte)0xFF };
   
    dataTypes.typeEnum = EnumLong.ALPHA;
   
    pm.insert(dataTypes);
   
    // to test that fields are read back correctly
    pm.createQuery(DataTypes.class).filter("id", dataTypes.id).get();
   
    DataTypes same = pm.createQuery(DataTypes.class).get();
    assertEqualsDataTypes(dataTypes, same);
  }
View Full Code Here

    b.parent = a;
    pm.update(b);
  }
 
  public void testDataTypesNull() {
    DataTypes dataTypes = new DataTypes();
    pm.insert(dataTypes);
   
    assertEqualsDataTypes(dataTypes, pm.createQuery(DataTypes.class).get());
  }
View Full Code Here

 
  public void testDataTypesNotNull() {
    char[] c = new char[501];
    Arrays.fill(c, 'x');
   
    DataTypes dataTypes = new DataTypes();
    dataTypes.typeByte = 1;
    dataTypes.typeShort = 2;
    dataTypes.typeInt = 3;
    dataTypes.typeLong = 4;
    dataTypes.typeFloat = 5;
    dataTypes.typeDouble = 6;
    dataTypes.typeDate = new Date();
    dataTypes.typeString = "hello";
    dataTypes.typeLargeString = new String(c);
    dataTypes.typeJson = map().put("foo", "bar");
    dataTypes.addresses = new ArrayList<Address>();
    dataTypes.addresses.add(new Address("Castellana", "Madrid"));
    dataTypes.addresses.add(new Address("Diagonal", "Barcelona"));
    dataTypes.contacts = new HashMap<String, Contact>();
    dataTypes.contacts.put("id1", new Contact("Somebody", Arrays.asList("foo", "bar")));
   
    dataTypes.shortShort = Short.MAX_VALUE;
    dataTypes.intInt = Integer.MAX_VALUE;
    dataTypes.longLong = Long.MAX_VALUE;
    dataTypes.boolBool = Boolean.TRUE;
   
    // Blob
    dataTypes.typeBlob = new byte[] {
        (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x04,
        (byte)0x10(byte)0X11, (byte)0xF0, (byte)0xF1,
        (byte)0xF9(byte)0xFF };
   
    dataTypes.typeEnum = EnumLong.ALPHA;
   
    pm.insert(dataTypes);
   
    // to test that fields are read back correctly
    pm.createQuery(DataTypes.class).filter("id", dataTypes.id).get();
   
    DataTypes same = pm.createQuery(DataTypes.class).get();
    assertEqualsDataTypes(dataTypes, same);
  }
View Full Code Here

TOP

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

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.