CursesLikeAPI implements TerminalInterface { @Override public TerminalCellLike get(int y, int x) { return terminal.get(y, x); } CursesLikeAPI(TerminalInterface terminal); void addch(int what); @Override void clear(); int getCurBackground(); int getCurForeground(); @Override @Deprecated int[] getCursorLocation(); @Override Positionable getCursorPosition(); @Override int getCursorX(); @Override int getCursorY(); String gets(int length); @Override String getString(int y, int x, int length); void init(); boolean isSeparateCursor(); void move(int y, int x); void mvaddch(int y, int x, int what); int mvgetch(int y, int x); void mvoverlaych(int y, int x, int what); void mvputs(int y, int x, String str); void overlaych(int what); void puts(String what); void setCurBackground(int c); void setCurBackground(String c); void setCurForeground(int c); void setCurForeground(String c); @Deprecated void setSeparateCursor(boolean separateCursor); @Override void clear(TerminalCellLike empty); @Override void copyFrom(TerminalViewInterface oterm, int numRows, int numCols, int startY, int startX, int destY, int destX); @Override void disableEventNotice(BlackenEventType event); void doupdate(); @Override void doUpdate(); @Override void disableEventNotices(); @Override void enableEventNotice(BlackenEventType event); @Override @Deprecated void enableEventNotices(EnumSet<BlackenEventType> events); @Override TerminalCellLike get(int y, int x); @Override int getch(); @Override int getch(int millis); @Override boolean keyWaiting(); @Override Regionlike getBounds(); @Override TerminalCellLike getEmpty(); @Override Grid<TerminalCellLike> getGrid(); @Override int getHeight(); @Override EnumSet<BlackenModifier> getLockingStates(); @Override BlackenMouseEvent getmouse(); @Override ColorPalette getPalette(); @Override int getWidth(); @Override BlackenWindowEvent getwindow(); @Override @Deprecated int gridHeight(); @Override @Deprecated int gridWidth(); @Override void init(String name, int rows, int cols); @Override void init(String name, int rows, int cols, String... font); @Override void moveBlock(int numRows, int numCols, int origY, int origX,
            int newY, int newX); @Override void quit(); @Override void refresh(); @Override void resize(int rows, int cols); @Override void set(int y, int x, String sequence, Integer foreground, Integer background, EnumSet<TerminalStyle> style, EnumSet<CellWalls> walls); @Override void set(int y, int x, TerminalCellLike cell); @Override void set(int y, int x, String sequence, Integer foreground, Integer background); @Override void setCursorLocation(int y, int x); @Override @Deprecated void setCursorLocation(int[] pos); @Override void setCursorPosition(Positionable pos); @Override void setEmpty(TerminalCellLike empty); @Override void setFont(String font, boolean checkFont); @Override String setFont(String... font); @Override ColorPalette setPalette(ColorPalette palette); @Override ColorPalette coerceToPalette(ColorPalette palette, Integer white, Integer black); @Override ColorPalette coerceToPalette(ColorPalette palette, String white, String black); @Override @Deprecated ColorPalette setPalette(ColorPalette palette, int white, int black); @Override TerminalCellLike assign(int y, int x, TerminalCellLike cell); @Override boolean setFullScreen(boolean state); @Override boolean getFullScreen(); @Override void inhibitFullScreen(boolean state); @Override TerminalInterface getBackingTerminal(); @Override void init(String name, int rows, int cols, TerminalScreenSize size, String... font); @Override void init(String name, int rows, int cols, TerminalScreenSize size); @Override boolean isRunning(); @Override void setSize(TerminalScreenSize size); @Override @Deprecated TerminalInterface getBackingTerminalInterface(); @Override TerminalViewInterface getBackingTerminalView(); @Override void setBounds(Regionlike bounds); @Override void setBounds(int rows, int cols, int y1, int x1); @Override void refresh(int y, int x); @Override void setEventNotices(EnumSet<BlackenEventType> events); @Override EnumSet<BlackenEventType> getEventNotices(); @Override Positionable putString(int y, int x, String string); @Override void applyTemplate(int y, int x, TerminalCellTemplate template, int length); @Override Positionable putString(Positionable pos, String string); @Override BlackenImageLoader getImageLoader(); @Override int getX(); @Override int getY(); @Override BlackenConfig overrideConfig(String gameName);  }
@Test @Covers("public TerminalCellLike get(int,int)") public void get() { assertEquals(0, terminal.getCursorY()); assertEquals(0, terminal.getCursorX()); for (int y = 0; y < NUM_ROWS; y++) { for (int x = 0; x < NUM_COLS; x++) { terminal.get(y, x).setSequence(y * NUM_COLS + x); } } for (int y = 0; y < NUM_ROWS; y++) { for (int x = 0; x < NUM_COLS; x++) { assertEquals( String.valueOf(Character.toChars(y * NUM_COLS + x)), terminal.get(y, x).getSequence()); } } assertEquals(0, terminal.getCursorY()); assertEquals(0, terminal.getCursorX()); }