- Timestamp:
- 09/10/13 21:11:41 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/test/java/com/framsticks/params/FramsClassBuilderTest.java
r103 r105 6 6 import org.testng.annotations.Test; 7 7 8 import com.framsticks.core.ValueChange;9 8 import com.framsticks.params.types.EventParam; 10 9 import com.framsticks.params.types.ProcedureParam; 11 10 import com.framsticks.params.types.StringParam; 12 11 import com.framsticks.parsers.Savers; 12 import com.framsticks.structure.messages.ValueChange; 13 13 import com.framsticks.test.TestClass; 14 14 import com.framsticks.test.TestConfiguration; … … 16 16 17 17 import static org.fest.assertions.Assertions.*; 18 import static com.framsticks.params.ParamsUtil.arguments; 19 import static com.framsticks.params.ParamsUtil.getParam; 18 20 19 21 @Test … … 43 45 assertThat(framsClass.getParam("resetHistory")).isInstanceOf(ProcedureParam.class); 44 46 45 ProcedureParam appendHistory = framsClass.getParamEntry("appendHistory", ProcedureParam.class); 47 48 ProcedureParam appendHistory = getParam(framsClass, "appendHistory", ProcedureParam.class); 46 49 assertThat(appendHistory.getArgumentsType().size()).isEqualTo(1); 47 50 assertThat(appendHistory.getArgumentsType().get(0).getId()).isEqualTo("arg0"); … … 111 114 112 115 assertThat(access.get("history", String.class)).isEqualTo("initial|first|"); 113 Object result = access.call("appendHistory", new Object[] {"second"});116 Object result = access.call("appendHistory", arguments("second")); 114 117 115 118 assertThat(result).isInstanceOf(Integer.class); … … 117 120 assertThat(access.get("history", String.class)).isEqualTo("initial|first|second|"); 118 121 119 result = access.call("resetHistory" , null);122 result = access.call("resetHistory"); 120 123 assertThat(result).isNull(); 121 124 … … 136 139 }; 137 140 138 final EventParam eventParam = access.getFramsClass().getParamEntry("history_changed", EventParam.class);141 final EventParam eventParam = getParam(access, "history_changed", EventParam.class); 139 142 access.reg(eventParam, listener); 140 143 … … 142 145 final String addition = "test"; 143 146 144 access.call("appendHistory", new Object[] { addition });147 access.call("appendHistory", arguments(addition)); 145 148 146 149 String expected = currentHistory + addition + "|";
Note: See TracChangeset
for help on using the changeset viewer.