Exemple #1
0
 public void returns_all_channels_going_forward() {
   ChannelIterator it = tv.iterator();
   int i = 0;
   while (it.hasNext()) {
     String currentChannel = it.currentChannel();
     Assert.assertEquals(channels.get(i), currentChannel);
     i++;
     it.next();
   }
 }
Exemple #2
0
 public void returns_all_channels_going_backwards() {
   ChannelIterator it = tv.iterator();
   it.setPosition(2);
   int i = 2;
   while (it.hasPrevious()) {
     String currentChannel = it.currentChannel();
     Assert.assertEquals(channels.get(i), currentChannel);
     i--;
     it.previous();
   }
 }
Exemple #3
0
  public void returns_first_channel() {
    ChannelIterator it = tv.iterator();
    String currentChannel = it.currentChannel();

    Assert.assertEquals("cnn", currentChannel);
  }