Ignore:
Timestamp:
08/16/12 14:45:03 (12 years ago)
Author:
sherbold
Message:
  • countless adaptations throughout nearly all components to remove errors introduced due to the refactoring of the event core
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-usageprofiles-test/src/test/java/de/ugoe/cs/quest/usageprofiles/DeterministicFiniteAutomatonTest.java

    r518 r548  
    77import de.ugoe.cs.quest.eventcore.Event; 
    88import de.ugoe.cs.quest.usageprofiles.DeterministicFiniteAutomaton; 
     9import de.ugoe.cs.quest.usageprofiles.mock.StringEventType; 
    910 
    1011import java.util.Random; 
     
    2223public class DeterministicFiniteAutomatonTest { 
    2324 
    24         Collection<List<? extends Event<?>>> sequences; 
     25        Collection<List<Event>> sequences; 
    2526 
    2627        @Test 
     
    4647                fixture.train(sequences); 
    4748 
    48                 List<Event<String>> context = new ArrayList<Event<String>>(); 
    49                 context.add(new Event<String>("a")); 
    50                 context.add(new Event<String>("b")); 
     49                List<Event> context = new ArrayList<Event>(); 
     50                context.add(new Event(new StringEventType("a"))); 
     51                context.add(new Event(new StringEventType("b"))); 
    5152 
    52                 Event<String> symbol = new Event<String>("r"); 
     53                Event symbol = new Event(new StringEventType("r")); 
    5354 
    5455                double result = fixture.getProbability(context, symbol); 
     
    6364                fixture.train(sequences); 
    6465 
    65                 List<Event<String>> context = new ArrayList<Event<String>>(); 
    66                 context.add(new Event<String>("a")); 
     66                List<Event> context = new ArrayList<Event>(); 
     67                context.add(new Event(new StringEventType("a"))); 
    6768 
    68                 Event<String> symbol = new Event<String>("b"); 
     69                Event symbol = new Event(new StringEventType("b")); 
    6970 
    7071                double result = fixture.getProbability(context, symbol); 
     
    7980                fixture.train(sequences); 
    8081 
    81                 List<Event<String>> context = new ArrayList<Event<String>>(); 
    82                 context.add(new Event<String>("a")); 
     82                List<Event> context = new ArrayList<Event>(); 
     83                context.add(new Event(new StringEventType("a"))); 
    8384 
    84                 Event<String> symbol = new Event<String>("c"); 
     85                Event symbol = new Event(new StringEventType("c")); 
    8586 
    8687                double result = fixture.getProbability(context, symbol); 
     
    9596                fixture.train(sequences); 
    9697 
    97                 List<Event<String>> context = new ArrayList<Event<String>>(); 
    98                 context.add(new Event<String>("a")); 
     98                List<Event> context = new ArrayList<Event>(); 
     99                context.add(new Event(new StringEventType("a"))); 
    99100 
    100                 Event<String> symbol = new Event<String>("e"); 
     101                Event symbol = new Event(new StringEventType("e")); 
    101102 
    102103                double result = fixture.getProbability(context, symbol); 
     
    111112                fixture.train(sequences); 
    112113 
    113                 List<Event<String>> context = new ArrayList<Event<String>>(); 
    114                 context.add(new Event<String>("a")); 
     114                List<Event> context = new ArrayList<Event>(); 
     115                context.add(new Event(new StringEventType("a"))); 
    115116 
    116                 Event<String> symbol = null; 
     117                Event symbol = null; 
    117118 
    118119                fixture.getProbability(context, symbol); 
     
    125126                fixture.train(sequences); 
    126127 
    127                 List<Event<String>> context = null; 
     128                List<Event> context = null; 
    128129 
    129                 Event<String> symbol = new Event<String>("a"); 
     130                Event symbol = new Event(new StringEventType("a")); 
    130131 
    131132                fixture.getProbability(context, symbol); 
     
    134135        @Before 
    135136        public void setUp() throws Exception { 
    136                 List<Event<?>> sequence = new ArrayList<Event<?>>(); 
    137                 sequence.add(new Event<String>("a")); 
    138                 sequence.add(new Event<String>("b")); 
    139                 sequence.add(new Event<String>("r")); 
    140                 sequence.add(new Event<String>("a")); 
    141                 sequence.add(new Event<String>("c")); 
    142                 sequence.add(new Event<String>("a")); 
    143                 sequence.add(new Event<String>("d")); 
    144                 sequence.add(new Event<String>("a")); 
    145                 sequence.add(new Event<String>("b")); 
    146                 sequence.add(new Event<String>("r")); 
    147                 sequence.add(new Event<String>("a")); 
     137                List<Event> sequence = new ArrayList<Event>(); 
     138                sequence.add(new Event(new StringEventType("a"))); 
     139                sequence.add(new Event(new StringEventType("b"))); 
     140                sequence.add(new Event(new StringEventType("r"))); 
     141                sequence.add(new Event(new StringEventType("a"))); 
     142                sequence.add(new Event(new StringEventType("c"))); 
     143                sequence.add(new Event(new StringEventType("a"))); 
     144                sequence.add(new Event(new StringEventType("d"))); 
     145                sequence.add(new Event(new StringEventType("a"))); 
     146                sequence.add(new Event(new StringEventType("b"))); 
     147                sequence.add(new Event(new StringEventType("r"))); 
     148                sequence.add(new Event(new StringEventType("a"))); 
    148149 
    149                 sequences = new ArrayList<List<? extends Event<?>>>(); 
     150                sequences = new ArrayList<List<Event>>(); 
    150151                sequences.add(sequence); 
    151152        } 
Note: See TracChangeset for help on using the changeset viewer.