Changeset 341


Ignore:
Timestamp:
12/21/11 12:26:54 (12 years ago)
Author:
sherbold
Message:
Location:
trunk/EventBenchCoreTest
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchCoreTest/.classpath

    r339 r341  
    3030        <classpathentry kind="lib" path="/Build/lib-test/junit-addons-1.4.jar"/> 
    3131        <classpathentry kind="lib" path="/Build/lib-test/objenesis.jar"/> 
     32        <classpathentry kind="lib" path="/JavaHelperLibTest/libs/junit-addons-1.4.jar"/> 
    3233        <classpathentry kind="output" path="bin"/> 
    3334</classpath> 
  • trunk/EventBenchCoreTest/src/de/ugoe/cs/eventbench/TestAll.java

    r338 r341  
    1717@Suite.SuiteClasses({ 
    1818        SequenceInstanceOfTest.class, 
     19        de.ugoe.cs.eventbench.assertions.TestAll.class, 
    1920        de.ugoe.cs.eventbench.coverage.TestAll.class, 
    2021        de.ugoe.cs.eventbench.data.TestAll.class, 
  • trunk/EventBenchCoreTest/src/de/ugoe/cs/eventbench/data/ReplayableEventTest.java

    r338 r341  
    66import junitx.framework.ListAssert; 
    77import de.ugoe.cs.eventbench.IReplayDecorator; 
     8import de.ugoe.cs.eventbench.data.mock.MockReplayable; 
    89import nl.jqno.equalsverifier.EqualsVerifier; 
    910import nl.jqno.equalsverifier.Warning; 
     
    2223public class ReplayableEventTest { 
    2324 
    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                 @Override 
    37                 public String getReplay() { 
    38                         return replay; 
    39                 } 
    40  
    41                 @Override 
    42                 public String getTarget() { 
    43                         return target; 
    44                 } 
    45  
    46                 @Override 
    47                 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 == null 
    60                                                         && target.equals(((MockReplayable) other).target); 
    61                                 } else { 
    62                                         return ((MockReplayable) other).replay == null 
    63                                                         && ((MockReplayable) other).target == null; 
    64                                 } 
    65                         } 
    66                         return false; 
    67                 } 
    68                  
    69                 @Override 
    70                 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          
    8225        private static class StubReplayDecorator implements IReplayDecorator { 
    8326 
Note: See TracChangeset for help on using the changeset viewer.