// Path: gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilder.java
// public interface JsonBuilder extends IsProperties {
// 
//   /**
//    * parses a json string and loads the resulting properties object,
//    * if the param 'fix' is true, the syntax of the json string will be
//    * checked previously and fixed when possible.
//    */
//   <J> J parse(String json, boolean fix);
// 
//   /**
//    * Returns the wrapped object, normally a Properties jso in client
//    * but can be used to return the underlying Json implementation in JVM.
//    * 
//    * @deprecated use asObject() instead.
//    */
//   <J> J getProperties();
// 
//   /**
//    * return the short name of this class, to use in json structures.
//    */
//   String getJsonName();
// }


import com.google.gwt.core.shared.GWT;
import com.google.gwt.junit.DoNotRunWith;
import com.google.gwt.junit.Platform;
import com.google.gwt.junit.client.GWTTestCase;
import com.google.gwt.query.client.Function;
import com.google.gwt.query.client.GQ;
import com.google.gwt.query.client.IsProperties;
import com.google.gwt.query.client.builders.JsonBuilder;
import com.google.gwt.query.client.builders.Name;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
/*
 * Copyright 2013, The gwtquery team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.gwt.query.client.dbinding;




/**
 * Tests for Deferred which can run either in JVM and GWT
 */
public class DataBindingTestJre extends GWTTestCase {

  public String getModuleName() {
    return null;
  }

  public void testPropertiesCreate() {
    IsProperties p1 = GQ.create();
    p1.set("a", "1");
    p1.set("b", 1);
    p1.set("c", "null");
    p1.set("d", null);
    p1.set("e", true);

    assertEquals("1", p1.get("a"));
    assertEquals(1d, p1.get("b"));
    assertEquals("null", p1.get("c"));
    assertNull(p1.get("d"));
    assertTrue((Boolean)p1.get("e"));

    p1 = GQ.create(p1.toJson());

    assertEquals("1", p1.get("a"));
    assertEquals(1d, p1.get("b"));
    assertEquals("null", p1.get("c"));
    assertNull(p1.get("d"));
  }

// Path: gwtquery-core/src/main/java/com/google/gwt/query/client/builders/JsonBuilder.java
// public interface JsonBuilder extends IsProperties {
// 
//   /**
//    * parses a json string and loads the resulting properties object,
//    * if the param 'fix' is true, the syntax of the json string will be
//    * checked previously and fixed when possible.
//    */
//   <J> J parse(String json, boolean fix);
// 
//   /**
//    * Returns the wrapped object, normally a Properties jso in client
//    * but can be used to return the underlying Json implementation in JVM.
//    * 
//    * @deprecated use asObject() instead.
//    */
//   <J> J getProperties();
// 
//   /**
//    * return the short name of this class, to use in json structures.
//    */
//   String getJsonName();
// }


// Path: gwtquery-core/src/test/java/com/google/gwt/query/client/dbinding/DataBindingTestJre.java
import com.google.gwt.core.shared.GWT;
import com.google.gwt.junit.DoNotRunWith;
import com.google.gwt.junit.Platform;
import com.google.gwt.junit.client.GWTTestCase;
import com.google.gwt.query.client.Function;
import com.google.gwt.query.client.GQ;
import com.google.gwt.query.client.IsProperties;
import com.google.gwt.query.client.builders.JsonBuilder;
import com.google.gwt.query.client.builders.Name;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;

/*
 * Copyright 2013, The gwtquery team.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.gwt.query.client.dbinding;




/**
 * Tests for Deferred which can run either in JVM and GWT
 */
public class DataBindingTestJre extends GWTTestCase {

  public String getModuleName() {
    return null;
  }

  public void testPropertiesCreate() {
    IsProperties p1 = GQ.create();
    p1.set("a", "1");
    p1.set("b", 1);
    p1.set("c", "null");
    p1.set("d", null);
    p1.set("e", true);

    assertEquals("1", p1.get("a"));
    assertEquals(1d, p1.get("b"));
    assertEquals("null", p1.get("c"));
    assertNull(p1.get("d"));
    assertTrue((Boolean)p1.get("e"));

    p1 = GQ.create(p1.toJson());

    assertEquals("1", p1.get("a"));
    assertEquals(1d, p1.get("b"));
    assertEquals("null", p1.get("c"));
    assertNull(p1.get("d"));
  }

  public interface Item extends JsonBuilder {