Changeset 101 for java/main/src/test/java
- Timestamp:
- 07/14/13 23:20:04 (11 years ago)
- Location:
- java/main/src/test/java/com/framsticks
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/test/java/com/framsticks/communication/RequestTest.java
r99 r101 28 28 29 29 assertThat(Request.takeRequestId(true, " 2 simple second")).isEqualTo(Pair.make(2, "simple second")); 30 assertThat(Request.takeRequestId(true, " -3 simple")).isEqualTo(Pair.make(-3, "simple")); 30 31 } 31 32 -
java/main/src/test/java/com/framsticks/core/ListChangeTest.java
r100 r101 7 7 8 8 import com.framsticks.core.ListChange.Action; 9 import com.framsticks.params.AccessOperations; 9 10 import com.framsticks.params.FramsClass; 10 11 import com.framsticks.params.ListSink; … … 60 61 @Test(dependsOnMethods = "createReflectionAccess") 61 62 public void load() throws Exception { 62 access.select(listChange).load(ListSource.createFrom("type:2", "pos:0", "id:test"));63 AccessOperations.load(access.select(listChange), ListSource.createFrom("type:2", "pos:0", "id:test")); 63 64 64 65 assertThat(listChange.action).isEqualTo(Action.Modify); -
java/main/src/test/java/com/framsticks/core/XmlBasedTest.java
r96 r101 26 26 } 27 27 28 protected abstract String getConfigurationName(); 28 protected String getConfigurationName() { 29 return this.getClass().getSimpleName() + ".xml"; 30 } 29 31 30 32 -
java/main/src/test/java/com/framsticks/gui/ProcedureBrowserTest.java
r100 r101 17 17 import com.framsticks.params.types.StringParam; 18 18 import com.framsticks.parsers.XmlLoader; 19 import com.framsticks.test. ChangeEvent;19 import com.framsticks.test.TestChangeEvent; 20 20 import com.framsticks.test.TestClass; 21 21 import com.framsticks.util.dispatching.FutureHandler; … … 82 82 waitForIdle(); 83 83 84 final EventListener< ChangeEvent> listener = new EventListener<ChangeEvent>() {84 final EventListener<TestChangeEvent> listener = new EventListener<TestChangeEvent>() { 85 85 86 86 @Override 87 public void action( ChangeEvent argument) {87 public void action(TestChangeEvent argument) { 88 88 assertThat(argument.history).isEqualTo(""); 89 89 } … … 96 96 assertThat(access.get("history", String.class)).isEqualTo("initial|Żółw|"); 97 97 98 tree.addListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, ChangeEvent.class, FutureHandler.doNothing(Void.class, failOnException));98 tree.addListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, TestChangeEvent.class, FutureHandler.doNothing(Void.class, failOnException)); 99 99 } 100 100 }); -
java/main/src/test/java/com/framsticks/gui/console/TrackConsoleTest.java
r98 r101 3 3 import org.testng.annotations.Test; 4 4 5 import com.framsticks.communication.Address;6 import com.framsticks.communication.ClientSideManagedConnection;7 import com.framsticks.communication.Connection;8 5 import com.framsticks.core.Path; 9 6 import com.framsticks.gui.GuiTest; … … 28 25 tree = new RemoteTree(); 29 26 30 tree.set Connection(Connection.to(new ClientSideManagedConnection(), new Address("localhost:9009")));27 tree.setAddress("localhost:9009"); 31 28 32 29 console = new TrackConsole().setConnection(tree.getConnection()); -
java/main/src/test/java/com/framsticks/hosting/ServerTest.java
r100 r101 15 15 import com.framsticks.remote.RemoteTree; 16 16 17 import com.framsticks.test. ChangeEvent;17 import com.framsticks.test.TestChangeEvent; 18 18 import com.framsticks.test.TestClass; 19 19 import com.framsticks.core.Tree; … … 45 45 protected LocalTree hosted; 46 46 protected TestClass hostedObject; 47 protected EventListener< ChangeEvent> listener;47 protected EventListener<TestChangeEvent> listener; 48 48 protected EventListener<ListChange> childListener; 49 49 … … 52 52 53 53 54 @Override55 protected String getConfigurationName() {56 return "ServerTest.xml";57 }58 54 59 55 @Test … … 127 123 public void registerListener() { 128 124 final Waiter waiter = produceWaiter(1.0); 129 listener = new EventListener< ChangeEvent>() {130 131 @Override 132 public void action( ChangeEvent argument) {125 listener = new EventListener<TestChangeEvent>() { 126 127 @Override 128 public void action(TestChangeEvent argument) { 133 129 listenerArguments.add(argument.history); 134 130 } … … 142 138 }); 143 139 144 addListener(remotePath, remoteTestFramsClass.getParamEntry("history_changed", EventParam.class), listener, ChangeEvent.class, produceWaiter(1.0).passInFuture(Void.class));140 addListener(remotePath, remoteTestFramsClass.getParamEntry("history_changed", EventParam.class), listener, TestChangeEvent.class, produceWaiter(1.0).passInFuture(Void.class)); 145 141 } 146 142 -
java/main/src/test/java/com/framsticks/model/ModelPackageTest.java
r100 r101 8 8 import com.framsticks.params.FramsClass; 9 9 import com.framsticks.params.ReflectionAccess; 10 import com.framsticks.params.Source Interface;10 import com.framsticks.params.Source; 11 11 import com.framsticks.params.ValueParam; 12 12 import com.framsticks.parsers.FileSource; … … 25 25 assertThat(stream).describedAs("stream " + filename).isNotNull(); 26 26 27 Source Interfacesource = new FileSource(stream, filename);27 Source source = new FileSource(stream, filename); 28 28 29 29 assertThat(source.isClosed()).isFalse(); -
java/main/src/test/java/com/framsticks/params/FramsClassBuilderTest.java
r100 r101 10 10 import com.framsticks.params.types.StringParam; 11 11 import com.framsticks.parsers.Savers; 12 import com.framsticks.test. ChangeEvent;12 import com.framsticks.test.TestChangeEvent; 13 13 import com.framsticks.test.TestClass; 14 14 import com.framsticks.test.TestConfiguration; … … 69 69 "id:history_changed", 70 70 "name:HistoryListener", 71 "type:e ChangeEvent",71 "type:e TestChangeEvent", 72 72 "", 73 73 "prop:", … … 128 128 final Holder<String> called = new Holder<>(); 129 129 130 final EventListener< ChangeEvent> listener = new EventListener<ChangeEvent>() {130 final EventListener<TestChangeEvent> listener = new EventListener<TestChangeEvent>() { 131 131 132 132 @Override 133 public void action( ChangeEvent argument) {133 public void action(TestChangeEvent argument) { 134 134 called.set(argument.history); 135 135 } -
java/main/src/test/java/com/framsticks/params/ParamBuilderTest.java
r100 r101 30 30 public void loadParam() throws Exception { 31 31 access = new ReflectionAccess(ParamBuilder.class, builderFramsClass); 32 Source Interfacesource = ListSource.createFrom("prop:", "id:v", "name:variable", "type:f", "help:just a testing variable", "");32 Source source = ListSource.createFrom("prop:", "id:v", "name:variable", "type:f", "help:just a testing variable", ""); 33 33 34 34 MultiParamLoader loader = new MultiParamLoader(); -
java/main/src/test/java/com/framsticks/parsers/F0ParserTest.java
r100 r101 73 73 @Test(dependsOnMethods = {"readF0"}) 74 74 public void stripAccess() { 75 components = Util.stripAccess(accesses, ModelComponent.class);75 components = ParamsUtil.stripAccess(accesses, ModelComponent.class); 76 76 77 77 assertThat(components.get(1)).isInstanceOf(Part.class); -
java/main/src/test/java/com/framsticks/running/ExternalProcessTest.java
r90 r101 9 9 import org.testng.annotations.Test; 10 10 11 import com.framsticks.core.ValueChange; 12 import com.framsticks.params.EventListener; 11 13 import com.framsticks.test.TestConfiguration; 12 14 import com.framsticks.util.dispatching.Monitor; … … 25 27 final List<String> output = new LinkedList<>(); 26 28 27 process.add Listener(new OutputListener() {29 process.addOutputListener(new EventListener<ValueChange>() { 28 30 @Override 29 public void onLineRead(String line) {30 output.add( line);31 public void action(ValueChange change) { 32 output.add(change.value.toString()); 31 33 } 32 34 });
Note: See TracChangeset
for help on using the changeset viewer.