Ignore:
Timestamp:
07/06/13 03:51:11 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • add proper exception passing between communication sides:

if exception occur during handling client request, it is
automatically passed as comment to error response.

it may be used to snoop communication between peers

  • fix algorithm choosing text controls in GUI
  • allow GUI testing in virtual frame buffer (xvfb)

FEST had some problem with xvfb but workaround was found

supports tab-completion based on requests history

CHANGELOG:
Further improve handling of exceptions in GUI.

Add StatusBar? implementing ExceptionResultHandler?.

Make completion processing asynchronous.

Minor changes.

Improve completion in console.

Improve history in InteractiveConsole?.

First working version of DirectConsole?.

Minor changes.

Make Connection.address non final.

It is more suitable to use in configuration.

Improvement of consoles.

Improve PopupMenu? and closing of FrameJoinable?.

Fix BrowserTest?.

Found bug with FEST running under xvfb.

JButtonFixture.click() is not working under xvfb.
GuiTest? has wrapper which uses JButton.doClick() directly.

Store CompositeParam? param in TreeNode?.

Simplify ClientSideManagedConnection? connecting.

There is now connectedFunctor needed, ApplicationRequests? can be
send right after creation. They are buffered until the version
and features are negotiated.

Narow down interface of ClientSideManagedConnection?.

Allow that connection specialization send only
ApplicationRequests?.

Improve policy of text control choosing.

Change name of Genotype in BrowserTest?.

Make BrowserTest? change name of Genotype.

Minor change.

First working draft of TrackConsole?.

Simplify Consoles.

More improvements with gui joinables.

Unify initialization on gui joinables.

More rework of Frame based entities.

Refactorize structure of JFrames based entities.

Extract GuiTest? from BrowserBaseTest?.

Reorganize Console classes structure.

Add Collection view to JoinableCollection?.

Configure timeout in testing.

Minor changes.

Rework connections hierarchy.

Add Mode to the get operation.

Make get and set in Tree take PrimitiveParam?.

Unify naming of operations.

Make RunAt? use the given ExceptionHandler?.

It wraps the virtual runAt() method call with
try-catch passing exception to handler.

Force RunAt? to include ExceptionHandler?.

Improve ClientAtServer?.

Minor change.

Another sweep with FindBugs?.

Rename Instance to Tree.

Minor changes.

Minor changes.

Further clarify semantics of Futures.

Add FutureHandler?.

FutureHandler? is refinement of Future, that proxifies
exception handling to ExceptionResultHandler? given
at construction time.

Remove StateFunctor? (use Future<Void> instead).

Make Connection use Future<Void>.

Unparametrize *ResponseFuture?.

Remove StateCallback? not needed anymore.

Distinguish between sides of ResponseFuture?.

Base ResponseCallback? on Future (now ResponseFuture?).

Make asynchronous store taking Future for flags.

Implement storeValue in ObjectInstance?.

File:
1 edited

Legend:

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

    r96 r97  
    77import org.testng.annotations.Test;
    88
    9 import com.framsticks.core.Instance;
    10 import com.framsticks.core.ObjectInstance;
     9import com.framsticks.core.Tree;
     10import com.framsticks.core.ObjectTree;
    1111import com.framsticks.params.AccessInterface;
    1212import com.framsticks.params.FramsClass;
     
    1515import com.framsticks.parsers.XmlLoader;
    1616import com.framsticks.test.TestClass;
     17// import com.framsticks.util.dispatching.Dispatching;
    1718import com.framsticks.util.dispatching.RunAt;
    18 import static com.framsticks.core.InstanceUtils.*;
     19import static com.framsticks.core.TreeOperations.*;
    1920
    2021@Test
    2122public class ProcedureBrowserTest extends BrowserBaseTest {
    2223
    23         ObjectInstance instance;
     24        ObjectTree tree;
    2425
    2526        @Override
     
    2728                browser = new XmlLoader().load(Browser.class, getClass().getResourceAsStream("/configs/ProcedureBrowserTest.xml"));
    2829
    29                 assertThat(browser.getInstances().size()).isEqualTo(1);
    30                 assertThat(browser.getInstances().get("test")).isInstanceOf(ObjectInstance.class);
     30                assertThat(browser.getTrees().size()).isEqualTo(1);
     31                assertThat(browser.getTrees().get("test")).isInstanceOf(ObjectTree.class);
    3132
    32                 instance = (ObjectInstance) browser.getInstances().get("test");
     33                tree = (ObjectTree) browser.getTrees().get("test");
    3334        }
    3435
    3536        @Test(timeOut = 10000)
    3637        public void testShow() {
    37                 instance.dispatch(new RunAt<Instance>() {
     38                tree.dispatch(new RunAt<Tree>(failOnException) {
    3839                        @Override
    39                         public void run() {
    40                                 assertThat(instance.getRootObject()).isInstanceOf(TestClass.class);
     40                        protected void runAt() {
     41                                assertThat(tree.getRootObject()).isInstanceOf(TestClass.class);
    4142                        }
    4243                });
     
    4445                clickAndExpandPath("test");
    4546
    46                 instance.dispatch(new RunAt<Instance>() {
     47                tree.dispatch(new RunAt<Tree>(failOnException) {
    4748                        @Override
    48                         public void run() {
    49                                 assertThat(bindAccess(instance, "/").getFramsClass().getParam("history")).isInstanceOf(StringParam.class);
     49                        protected void runAt() {
     50                                assertThat(bindAccess(tree, "/").getFramsClass().getParam("history")).isInstanceOf(StringParam.class);
    5051                        }
    5152                });
     
    5354                // monitor.useFor(4.0);
    5455
    55                 instance.dispatch(new RunAt<Instance>() {
     56                tree.dispatch(new RunAt<Tree>(failOnException) {
    5657                        @Override
    57                         public void run() {
    58                                 AccessInterface access = bindAccess(instance, "/");
     58                        protected void runAt() {
     59                                AccessInterface access = bindAccess(tree, "/");
    5960                                assertThat(access).isInstanceOf(ReflectionAccess.class);
    6061                                FramsClass framsClass = access.getFramsClass();
     
    6566                                assertThat(framsClass.getParam(3).getId()).isEqualTo("resetHistory");
    6667
    67                                 assertThat(access.get("history", String.class)).isEqualTo("");
     68                                assertThat(access.get("history", String.class)).isEqualTo("initial|");
    6869                        }
    6970                });
    7071
    7172                // frame.panel("TestClass");
    72                 JPanelFixture appendHistory = frame.panel("TestClass").panel("appendHistory");
    73                 appendHistory.panel("arg0").textBox("value").enterText("argument");
    74                 appendHistory.button("call").click();
     73                final JPanelFixture appendHistory = frame.panel("TestClass").panel("appendHistory");
     74                appendHistory.panel("arg0").textBox("value").enterText("Żółw");
     75                assertThat(appendHistory.panel("arg0").textBox("value").text()).isEqualTo("Żółw");
     76                clickButton(appendHistory.button("call"));
    7577                waitForIdle();
    7678
    77                 instance.dispatch(new RunAt<Instance>() {
     79
     80                tree.dispatch(new RunAt<Tree>(failOnException) {
    7881                        @Override
    79                         public void run() {
    80                                 assertThat(bindAccess(instance, "/").get("history", String.class)).isEqualTo("argument|");
     82                        protected void runAt() {
     83                                assertThat(bindAccess(tree, "/").get("history", String.class)).isEqualTo("initial|Żółw|");
    8184                        }
    8285                });
    8386
    84                 frame.panel("TestClass").panel("resetHistory").button("call").click();
     87                clickButton(frame.panel("TestClass").panel("resetHistory").button("call"));
    8588                waitForIdle();
    8689
    87                 instance.dispatch(new RunAt<Instance>() {
     90                tree.dispatch(new RunAt<Tree>(failOnException) {
    8891                        @Override
    89                         public void run() {
    90                                 assertThat(bindAccess(instance, "/").get("history", String.class)).isEqualTo("");
     92                        protected void runAt() {
     93                                assertThat(bindAccess(tree, "/").get("history", String.class)).isEqualTo("");
    9194                        }
    9295                });
Note: See TracChangeset for help on using the changeset viewer.