Coder Social home page Coder Social logo

json-java-unit-test's People

Contributors

alanscut avatar billdeng avatar erosb avatar johnjaylward avatar madsager avatar mdaehnert avatar migueltt avatar run2000 avatar seanthomasleary avatar stleary avatar strkkk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

json-java-unit-test's Issues

Move files to maven-friendly directories

Changes to the JSON-Java directory and package structure are not anticipated.
Probably move the Junit test files to src/test/java/org/json/junit
Move the test data files (e.g. MyBean.java) to src/test/resources

Is the tag 20160212 targeting JSON-Java/20160212?

I checked out both repositories on 20160212 and failed to compile.

[ERROR] /Users/onacit/tmp/JSON-Java-MG/src/test/java/org/json/junit/src/test/org/json/junit/CookieListTest.java:[182,73] cannot find symbol
[ERROR] symbol:   variable JsonPath
[ERROR] location: class org.json.junit.CookieListTest

Investigate issues with changing only the JSONObject and JSONArray ctors

stleary/JSON-java#153 was closed with the intent that only the JSONObject and JSONArray ctors might be changed as folllows:

public JSONObject(Map<String, ?> map) {
    this.map = new HashMap<String, Object>();
    if (map != null) {
        for (final Entry<String, ?> e : map.entrySet()) {
            final Object value = e.getValue();
            if (value != null) {
                this.map.put(e.getKey(), wrap(value));
            }
        }
    }
}

public JSONArray(Collection<?> collection) {
    this.myArrayList = new ArrayList<Object>();
    if (collection != null) {
        for (Object o : collection) {
            this.myArrayList.add(JSONObject.wrap(o));
        }
    }
}

These limited changes pass unit tests. Need to add tests at least for Map<String, String> and Collection<String>. Also, if this is the only change made, are there any use cases where users' code could break or not work as intended? In particular, check the put(), opt(), and get() methods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.