use of net.sf.latexdraw.view.jfx.MagneticGridImpl in project latexdraw by arnobl.
the class TestModifyMagneticGrid method setUp.
@Override
@Before
public void setUp() {
super.setUp();
grid = new MagneticGridImpl(new Canvas());
// Cannot have two runners so cannot use mock to mock Canvas:
CommandsRegistry.INSTANCE.removeAllHandlers();
switch(property) {
case STYLE:
mementoCmd = () -> grid.getGridStyle();
value = GridStyle.STANDARD;
break;
case MAGNETIC:
mementoCmd = () -> grid.isMagnetic();
value = true;
break;
case GRID_SPACING:
mementoCmd = () -> grid.getGridSpacing();
value = 11;
break;
}
memento = mementoCmd.get();
}
Aggregations