# # Copyright (c) 2003 by Benja Fallenstein # # This file is part of Fenfire. # # Fenfire is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Fenfire is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General # Public License for more details. # # You should have received a copy of the GNU Lesser General # Public License along with Fenfire; if not, write to the Free # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # import org.fenfire.loom def test(): s = org.fenfire.loom.ViewSettings(None) assert isinstance(s.getView(), org.fenfire.loom.WheelView) assert s.getViewIndex() == 0 assert s.isWheelView() s.changeView(1) assert isinstance(s.getView(), org.fenfire.loom.SimpleView) assert s.getViewIndex() == 1 assert s.isSimpleView() s.changeView(1) assert isinstance(s.getView(), org.fenfire.loom.WheelView) assert s.getViewIndex() == 0 assert s.isWheelView() s.changeView(-1) assert isinstance(s.getView(), org.fenfire.loom.SimpleView) assert s.getViewIndex() == 1 assert s.isSimpleView() s.setSimpleView() assert isinstance(s.getView(), org.fenfire.loom.SimpleView) assert s.getViewIndex() == 1 s.setWheelView() assert isinstance(s.getView(), org.fenfire.loom.WheelView) assert s.getViewIndex() == 0 s.setSimpleView() assert isinstance(s.getView(), org.fenfire.loom.SimpleView) assert s.getViewIndex() == 1 s.setViewIndex(0) assert isinstance(s.getView(), org.fenfire.loom.WheelView) assert s.getViewIndex() == 0 s.setViewIndex(1) assert isinstance(s.getView(), org.fenfire.loom.SimpleView) assert s.getViewIndex() == 1