Changeset 341 for trunk/EventBenchCoreTest
- Timestamp:
- 12/21/11 12:26:54 (13 years ago)
- Location:
- trunk/EventBenchCoreTest
- Files:
-
- 7 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCoreTest/.classpath
r339 r341 30 30 <classpathentry kind="lib" path="/Build/lib-test/junit-addons-1.4.jar"/> 31 31 <classpathentry kind="lib" path="/Build/lib-test/objenesis.jar"/> 32 <classpathentry kind="lib" path="/JavaHelperLibTest/libs/junit-addons-1.4.jar"/> 32 33 <classpathentry kind="output" path="bin"/> 33 34 </classpath> -
trunk/EventBenchCoreTest/src/de/ugoe/cs/eventbench/TestAll.java
r338 r341 17 17 @Suite.SuiteClasses({ 18 18 SequenceInstanceOfTest.class, 19 de.ugoe.cs.eventbench.assertions.TestAll.class, 19 20 de.ugoe.cs.eventbench.coverage.TestAll.class, 20 21 de.ugoe.cs.eventbench.data.TestAll.class, -
trunk/EventBenchCoreTest/src/de/ugoe/cs/eventbench/data/ReplayableEventTest.java
r338 r341 6 6 import junitx.framework.ListAssert; 7 7 import de.ugoe.cs.eventbench.IReplayDecorator; 8 import de.ugoe.cs.eventbench.data.mock.MockReplayable; 8 9 import nl.jqno.equalsverifier.EqualsVerifier; 9 10 import nl.jqno.equalsverifier.Warning; … … 22 23 public class ReplayableEventTest { 23 24 24 private static class MockReplayable implements IReplayable {25 26 private static final long serialVersionUID = 1L;27 28 final String replay;29 final String target;30 31 public MockReplayable(String replay, String target) {32 this.replay = replay;33 this.target = target;34 }35 36 @Override37 public String getReplay() {38 return replay;39 }40 41 @Override42 public String getTarget() {43 return target;44 }45 46 @Override47 public boolean equals(Object other) {48 if (this == other) {49 return true;50 }51 if (other instanceof MockReplayable) {52 if (replay != null && target != null) {53 return replay.equals(((MockReplayable) other).replay)54 && target.equals(((MockReplayable) other).target);55 } else if (replay != null && target == null) {56 return replay.equals(((MockReplayable) other).replay)57 && ((MockReplayable) other).target == null;58 } else if (replay == null && target != null) {59 return ((MockReplayable) other).replay == null60 && target.equals(((MockReplayable) other).target);61 } else {62 return ((MockReplayable) other).replay == null63 && ((MockReplayable) other).target == null;64 }65 }66 return false;67 }68 69 @Override70 public int hashCode() {71 int hashCode = 17;72 if( replay!=null ) {73 hashCode *= replay.hashCode();74 }75 if( target!=null ) {76 hashCode *= target.hashCode();77 }78 return hashCode;79 }80 }81 82 25 private static class StubReplayDecorator implements IReplayDecorator { 83 26
Note: See TracChangeset
for help on using the changeset viewer.