~jd-team/jdownloader/appwork-utils

« back to all changes in this revision

Viewing changes to src/org/appwork/moncompare/test/Test.java

  • Committer: thomas
  • Date: 2021-06-15 09:46:56 UTC
  • Revision ID: svn-v4:21714237-3853-44ef-a1f0-ef8f03a7d1fe::3520
ContextMenuAdapter: Added MouseEvent
Added $THIS and $SIZE to Condition
JSONFactory:
Refactoring for EditorDialog
Added String Dedupe
StorableDoc Annotations: Annotate Storables., these Annotations are used in the EditorDialog
Files.deleteRecursive: TO Discuss!
ReflectionUtils: Added is<NUMBER>Range Methods
ReflectionUtils: changed cast function to cast *.0 floatingpoints to the correct fixedpoint number
FlexiJSON: Added a very flexible, error prone JSON Parser - supports Streams in parsing and stringify. Different JSON Types are supported, including JSON5, comments, JS Objects,...Added compact Stringifer, pretty Printer and Properties Style Printer. 
Added JSON to Properties and Properties to JSON Converter

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
 
90
90
    public static void main(String[] args) throws CompareException, MapperException, ParserException {
91
91
        Application.setApplication(".test");
 
92
        System.out.println(true == new Condition("§this.0", new Condition(Condition.$EXISTS, true)).matches(new String[] { "" }));
 
93
        System.out.println(false == new Condition("§this.0", new Condition(Condition.$REGEX, "^https?://.+$")).matches(new String[] { "" }));
 
94
        System.out.println(JSonStorage.serializeToJson(JSonStorage.serializeToJson(new Condition("§this.0", new Condition(Condition.$REGEX, "^https?://.+$")))));
 
95
        System.out.println(true == new Condition("§this.0", new Condition(Condition.$REGEX, "^https?://.+$")).matches(new String[] { "http://www.google.de" }));
 
96
        System.out.println(false == new Condition("§this.0.§size", new Condition(Condition.$GT, 0)).matches(new String[] { "" }));
 
97
        System.out.println(true == new Condition("§this.0.§size", new Condition(Condition.$GT, 0)).matches(new String[] { "1" }));
 
98
        System.out.println(true == new Condition($THIS, new Condition(Condition.$SIZE, new Condition($GT, 0))).matches(new String[] { "" }));
 
99
        System.out.println(false == new Condition($THIS, new Condition(Condition.$SIZE, new Condition($GT, 0))).matches(new String[] {}));
92
100
        HashMap<String, Object> test = new HashMap<String, Object>();
93
101
        test.put("a", 1);
94
102
        test.put("sa", new String[] { "a", "b" });