Ignore:
Timestamp:
09/10/13 21:11:41 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • import refactorization: move Tree, Path, etc.

from core to structure package

  • initial serialization implementation
  • improve PrimeExperiment? test
  • many organizational changes and convenience improvements

CHANGELOG:
Make registry in AbstractTree? final.

Move most classes from core to structure package.

Minor changes.

Switch names of Future and FutureHandler?.

Rename ExceptionResultHandler? to ExceptionHandler?.

Rename ExceptionHandler? to ExceptionDispatcherHandler?.

Fix bug in ParamCandidate? cache.

Add missing synchronization to the BufferedDispatcher?.

Develop @Serialized support.

Rework serialization further.

Add serialization/deserialization interface to ValueParam?.

Move getStorageType and isNumeric from Param down to params hierarchy.

Minor changes.

Improve param type induction.

Add TestSerializedClass? for testing new serialization.

Add info files gor GenePool? and Population.

Add standard.expt exemplary netfile.

Add type name field to PropertiesObject?.

Use PropertiesObject? for PropertiesAccess? instead of ordinary map.

Hide getFramsClass is several more places.

More unification accross FramsClass?, Access and Path.

Add ParamCollection?.

Simplify interface for getting params from FramsClass?, Access
or Path.

Make Access.call() interface variadic.

Add arguments(args) convenience wrapper around new Object[] {args}.

Upgrade to apache.commons.lang version 3.1

Minor improvement with Response constructors.

Develop proper result printing in ClientAtServer?.

Add experimentNetsave to PrimeExperiment?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/test/java/com/framsticks/gui/ProcedureBrowserTest.java

    r103 r105  
    77import org.testng.annotations.Test;
    88
    9 import com.framsticks.core.Path;
    10 import com.framsticks.core.Tree;
    11 import com.framsticks.core.LocalTree;
    12 import com.framsticks.core.ValueChange;
    139import com.framsticks.params.Access;
    1410import com.framsticks.params.EventListener;
    15 import com.framsticks.params.FramsClass;
    1611import com.framsticks.params.ReflectionAccess;
    1712import com.framsticks.params.types.EventParam;
    1813import com.framsticks.params.types.StringParam;
    1914import com.framsticks.parsers.XmlLoader;
     15import com.framsticks.structure.LocalTree;
     16import com.framsticks.structure.Path;
     17import com.framsticks.structure.Tree;
     18import com.framsticks.structure.messages.ValueChange;
    2019import com.framsticks.test.TestClass;
    21 import com.framsticks.util.dispatching.FutureHandler;
     20import com.framsticks.util.dispatching.Future;
    2221// import com.framsticks.util.dispatching.Dispatching;
    2322import com.framsticks.util.dispatching.RunAt;
    24 import static com.framsticks.core.TreeOperations.*;
     23import static com.framsticks.params.ParamsUtil.getParam;
     24import static com.framsticks.structure.TreeOperations.*;
    2525
    2626@Test
     
    5353                        @Override
    5454                        protected void runAt() {
    55                                 assertThat(bindAccess(tree, "/").getFramsClass().getParam("history")).isInstanceOf(StringParam.class);
     55                                assertThat(getParam(bindAccess(tree, "/"), "history")).isInstanceOf(StringParam.class);
    5656                        }
    5757                });
     
    6464                                Access access = bindAccess(tree, "/");
    6565                                assertThat(access).isInstanceOf(ReflectionAccess.class);
    66                                 FramsClass framsClass = access.getFramsClass();
    67                                 assertThat(framsClass.getParam(0).getId()).isEqualTo("name");
    68                                 assertThat(framsClass.getParam(1).getId()).isEqualTo("history");
    69                                 assertThat(framsClass.getParam(2).getId()).isEqualTo("history_changed");
    70                                 assertThat(framsClass.getParam(3).getId()).isEqualTo("appendHistory");
    71                                 assertThat(framsClass.getParam(4).getId()).isEqualTo("resetHistory");
     66                                assertThat(getParam(access, 0).getId()).isEqualTo("name");
     67                                assertThat(getParam(access, 1).getId()).isEqualTo("history");
     68                                assertThat(getParam(access, 2).getId()).isEqualTo("history_changed");
     69                                assertThat(getParam(access, 3).getId()).isEqualTo("appendHistory");
     70                                assertThat(getParam(access, 4).getId()).isEqualTo("resetHistory");
    7271
    7372                                assertThat(access.get("history", String.class)).isEqualTo("initial|");
     
    9695                                assertThat(access.get("history", String.class)).isEqualTo("initial|Żółw|");
    9796
    98                                 tree.addListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, ValueChange.class, FutureHandler.doNothing(Void.class, failOnException));
     97                                tree.addListener(Path.to(tree, "/"), getParam(access, "history_changed", EventParam.class), listener, ValueChange.class, Future.doNothing(Void.class, failOnException));
    9998                        }
    10099                });
     
    109108                                assertThat(access.get("history", String.class)).isEqualTo("");
    110109
    111                                 tree.removeListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, FutureHandler.doNothing(Void.class, failOnException));
     110                                tree.removeListener(Path.to(tree, "/"), getParam(access, "history_changed", EventParam.class), listener, Future.doNothing(Void.class, failOnException));
    112111                        }
    113112                });
Note: See TracChangeset for help on using the changeset viewer.