Package info.caiiiycuk.stail.impl

Examples of info.caiiiycuk.stail.impl.Marker


 
  @Test
  public void testMarkerState() {
    createHolders();
   
    Marker marker;
   
    marker = processHolderFull.makeMarker();
   
    new IndexedMarkerState(0).applyState(marker).next();
    assertEquals('Q', marker.toString().charAt(0));
   
    new IndexedMarkerState(24).applyState(marker).next();
    assertEquals('N', marker.toString().charAt(0));
   
    marker = processHolderFive.makeMarker();
   
    new IndexedMarkerState(0).applyState(marker).next();
    assertEquals('X', marker.toString().charAt(0));
   
    new IndexedMarkerState(20).applyState(marker).next();
    assertEquals('X', marker.toString().charAt(0));
   
    new IndexedMarkerState(24).applyState(marker).next();
    assertEquals('N', marker.toString().charAt(0));
   
    cancleHolders();
  }
View Full Code Here


        Thread.sleep(100);
      } catch (InterruptedException e) {
      }
    }
   
    Marker marker = new IndexedMarkerState(25).applyState(processHolderFive.makeMarker());
   
    if (marker.next()) {
      assertEquals('M', marker.toString().charAt(0));
    }
   
  }
View Full Code Here

  public void testMarkers() {
    createHolders();
   
    String full = "QWERTYUIOPASDFGHJKLZXCVBNM";
   
    Marker marker;
   
    {
      marker = new IndexedMarkerState(0).applyState(processHolderFull.makeMarker());
     
      int index = 0;
      while (marker.next()) {
        assertEquals(1, marker.toString().length());
        assertEquals(full.charAt(index), marker.toString().charAt(0));
        index++;
      }
     
      assertEquals(25, index);
    }
   
    {
      marker = new IndexedMarkerState(15).applyState(processHolderFull.makeMarker());
     
      int index = 15;
      while (marker.next()) {
        assertEquals(1, marker.toString().length());
        assertEquals(full.charAt(index), marker.toString().charAt(0));
        index++;
      }
     
      assertEquals(25, index);
    }
   
    {
      marker = new IndexedMarkerState(20).applyState(processHolderFive.makeMarker());
     
      int index = 20;
      while (marker.next()) {
        assertEquals(1, marker.toString().length());
        assertEquals(full.charAt(index), marker.toString().charAt(0));
        index++;
      }
     
      assertEquals(25, index);
    }
View Full Code Here

TOP

Related Classes of info.caiiiycuk.stail.impl.Marker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.